Simple JSON Format

The SPARQL 1.1 specification provides details about various serializations of SPARQL result sets. They do include a JSON format, but this is a bit verbose and not ideal for all scenarios. TopBraid therefore supports an alternative "simple" SPARQL Result Set format with the syntax shown below.

The mime type of this format is application/sparql-results+json-simple

Example query:

SELECT ?firstName ?lastName ?parent
WHERE {
    ...
}

Example output:

[
    {
        "firstName" : "John",
        "lastName" : "Doe",
        "parent" : "http://example.org/Person2"
    },
    {
        "firstName" : ...
        ...
    }
]

Each result set row becomes one JSON object, with one string field for each bound variable. Literals are serialized by their lexical form. URI resources are displayed by their URI. Blank nodes with @[blank node id]. Null values are suppressed.