- From: Nathan <nathan@webr3.org>
- Date: Wed, 23 Mar 2011 13:44:52 +0000
- To: RDF WG <public-rdf-wg@w3.org>
Hi All,
Just a couple of little things that I haven't mentioned on list yet,
that may or may not be useful, but worth mentioning.
1: JSON allows spaces in key names
Which means, that if a structure such as:
{
"s": {
"p1": "o1",
"p2": "o2",
}
}
was adopted, then one could have multiple space separated subjects or
properties as syntax sugar and to decrease bytesize, such as:
{
"s1 s2": {
"type": "Person"
}
}
or
{
"subject": {
"name title": "London"
}
}
2: There's always a predicate based approach too.. where rather than
traditional triples (s p o) we write as p(s o) and optimize..
{
"name": {
"s": ":me",
"o": "Nathan"
},
"age": {
"s": ":bob",
"o": 43
}
}
which would allow multiple subjects
{
"type": {
"s": [":Bob", ":Ann", ":Mark"],
"o": ":Person"
}
}
and multiple objects
{
"name": {
"s": ":me",
"o": ["Nathan","Nathan Rixham"]
}
}
and of course multiple (s o) pairs:
{
"name": [
{"s": ":me", "o": "Nathan"},
{"s": ":Bob", "o": "Bob"},
{"s": ":Tim", "o": "Timothy"}
]
}
}
3: As above, but subjects as keys..
{
"name": {
":me": ["Nathan", "NathanR"],
":Bob": "Bob",
":Tim", "Timothy",
}
}
or even couple with (1)
{
"type": { ":me :Bob :Tim": ":Person" },
"name title": { ":London_UK": "London" }
}
Just a note to say that there are many weird and wonderful options...
Best,
Nathan
Received on Wednesday, 23 March 2011 13:45:51 UTC