format sparql query to work in a json object

Viewed 20

I have a JSON file that I'm trying to add a sparql string to but when I load it using axios it comes is as a string instead of JSON. Anyone know of a formatter that I could use to make this work?

If I remove the query all other values returns as JSON

 [
    {
    "id": "{{faker 'datatype.uuid'}}",
    "created_at": "{{faker 'date.recent' 365}}",
    "query": "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n"
             +"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\n"
             +"SELECT DISTINCT ?sub ?pred ?obj WHERE {\n"
             +"<https://www.genenames.org/data/gene-symbol-report/#!/hgnc_id/HGNC:11998> ?pred ?obj .\n"
             +"BIND (<https://www.genenames.org/data/gene-symbol-report/#!/hgnc_id/HGNC:11998> as ?sub)\n"
             +"}LIMIT 100"
  }
]
0 Answers
Related