← Prev in month
← Prev in thread
Next in thread →
Next in month →
Request for help
So I am doing a quick course check to make sure I am serializing things properly in XDI JSON. Please look at the FOAF extension snippet below, and the XDI JSON version of it that is below that, and tell me how you would serialize it differently, if you would. Please keep in mind this is as it would be input into an XDI store, so no inferred XRIs except a few explicitly stated by the user in their input.
The OwnedItem extension snippet:
<ns:OwnedItem>
<ns:owner>
<foaf:Person rdf:about”http://example.org/alice” />
</ns:owner>
<ns:item>
<book:Book dc:title="1984"/>
</ns:item>
<dc:date>2003-12-25</dc:date>
<ns:source>
<foaf:Person rdf:about=”http://example.org/bob” />
</ns:source>
</ns:OwnedItem>
Btw, I know that technically, for a conversion, I'd need to use (http://example.org/bob) rather than =bob, but I am just using =bob and -alice for the example.
The XDI JSON version:
{
"*": {
"$is": [
"=alice+possession$1"
],
"$is$a": [
"=alice+possession$",
"+possession$"
]
},
"$": {
"=alice+possession$1": {
"*": {
"$is$a": [
"=alice+possession",
"+possession"
],
"+owner": [
"=alice"
],
"+item": {
"$": {
"$is$a": [
"+book"
],
"+title": [
"(data:,1984)"
]
}
},
"+source": [
"=bob"
],
"$d": [
"(data:,2003-12-25)"
]
}
}
}
}
← Prev in month
← Prev in thread
Next in thread →
Next in month →