Hi Jeen,
We don't have documentation about these details but let me briefly describe them here with some examples.
For XML and JSON, we introduced an additional statement
value type with required s
, p
, o
fields and an optional g
field. Binding a variable x
to a statement would look like this in JSON:
{
"p": {
"type": "uri",
"value": "http://api.stardog.com/date"
},
"s": {
"type": "statement",
"s": {
"type": "uri",
"value": "http://api.stardog.com/Alice"
},
"p": {
"type": "uri",
"value": "http://api.stardog.com/knows"
},
"o": {
"type": "uri",
"value": "http://api.stardog.com/Bob"
}
},
and like this in XML:
<binding name='x'>
<statement>
<s>
<uri>http://api.stardog.com/Alice</uri>
</s>
<p>
<uri>http://api.stardog.com/knows</uri>
</p>
<o>
<uri>http://api.stardog.com/Bob</uri>
</o>
</statement>
</binding>
For the binary results, there is an additional STATEMENT_RECORD_MARKER = 10
to indicate the RDF value is a statement. SPO components are serialized without any markers between them followed by either a DEFAULT_GRAPH_RECORD_MARKER = 1
or NAMED_GRAPH_RECORD_MARKER = 2
(latter is followed by an RDF resource).
Best,
Evren