OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

xdi message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Replacing X3 with Semantic JSON


First, a reminder to everyone that we are not holding the regular XDI TC telecon tomorrow due to many of us travelling to the XDI Retreat in Whistler. Instead we will be holding a telecon on Friday, tentatively starting at 11AM Pacific Time, on our normal bridge number. We'll send out more details about that tomorrow night.

Second, to start off the retreat with a bang, after several long Skype sessions with Joseph in the last two days, he and I have a fascinating proposal to make: replacing X3 with Semantic JSON (Joseph's proposed name for the hybrid of Markus' and Bill's suggestions for the XDI JSON serialization format).

First let me explain the proposed format for Semantic JSON:

a) The X3J serialization format currently produced by Markus' XDI Converter utility at http://higgins.eclipse.org/xdi-converter/XDIConverter (see examples below) PLUS

b) A new escaping mechanism (see second example below) PLUS

c) The addition of support for all native JSON data types, with the requirement that native JSON objects and native JSON arrays must use the escaping mechanism (because otherwise they conflict with how the Semantic JSON serialization format uses JSON objects and JSON arrays to encode the XDI graph).

Second, the reason we think it can replace X3 is:

1) Semantic JSON is so close to X3 that we don't really gain much benefit from having two formats so similar.

2) Semantic JSON will now support all the native JSON datatypes (with the escaping rules above), so it is even more JSON friendly (which is what Bill has been arguing for).

3) If Semantic JSON is the default XDI format, it will make XDI more friendly and approachable to many developers.

4) We no longer have to worry about the three formats of X3 (Standard, Whitespace, Simple) -- JSON already has its own formatting conventions.

The only downside is not having support for comments. However I have an idea for a workaround that I'll float at the retreat.

Thoughts?

=Drummond


EXAMPLE OF CURRENT X3J FORMAT

{
	"=drummond": {
		"$is":
		[
			"=drummond.reed",
			"=!F83.62B1.44F.2813"
		],
		"$is$a":
		[
			"+person",
			"@oasis+chair"
		],
		"$has":
		[
			"+home",
			"+work",
			"+friend",
			"@cordance",
			"@parity"
		],
		"+email":
		{
			"=drummond+home": {
				"+email": null
			},
			"=drummond+work": {
				"+email": null
			}
		},
		"+email+signature$a$xml": "
\n		<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>
\n		<signature xmlns=\"http://example.com/ns\">
\n			<name>Drummond Reed</name>
\n			<affiliation>Cordance</affiliation>
\n			<affiliation>Parity</affiliation>
\n			<affiliation>OASIS</affiliation>
\n		</signature>
\n		",
		"+picture$a$json":
		{
		"Image": {
			"Width":  800,
			"Height": 600,
			"Title":  "Drummond at Graduation",
			"Thumbnail": {
				"Url":    "http://www.example.com/image/481989943",
				"Height": 125,
				"Width":  "100"
				},
			"IDs":[116, 943, 234, 38793]
			}
		}
		,
		"=web*markus":
		[
			"=drummond+friend"
		]
	},
	"=drummond+home": {
		"+email": "drummond@example.com"
	},
	"=drummond+work": {
		"+email":
		{
			"=drummond@cordance": {
				"+email": null
			},
			"=drummond@parity": {
				"+email": null
			}
		}
	},
	"=drummond@cordance": {
		"+email": "drummond.reed@cordance.example.com"
	},
	"=drummond@parity": {
		"+email": "drummond.reed@parity.example.com"
	},
	"=drummond+friend": {
		"$is$a":
		[
			"$contract",
			"@identity.commons$contract",
			"@identity.commons+personal$contract"
		],
		"$get":
		{
			"=drummond+home": null,
			"=drummond+work": null
		}
	}
}

EXAMPLE OF NEW PROPOSAL

Note that this is identical to the above except it shows the new proposed escaping mechanism (see text in red). This escaping would apply to both non-XDI JSON objects and non-XDI JSON arrays, as well as to XML or other text-based data formats. This example this does not yet show examples of a native JSON number or boolean.

{
	"=drummond": {
		"$is":
		[
			"=drummond.reed",
			"=!F83.62B1.44F.2813"
		],
		"$is$a":
		[
			"+person",
			"@oasis+chair"
		],
		"$has":
		[
			"+home",
			"+work",
			"+friend",
			"@cordance",
			"@parity"
		],
		"+email":
		{
			"=drummond+home": {
				"+email": null
			},
			"=drummond+work": {
				"+email": null
			}
		},
		"+email+signature
{
"$": {
$a$xml": "
\n <?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>
\n <signature xmlns=\"http://example.com/ns\">
\n <name>Drummond Reed</name>
\n <affiliation>Cordance</affiliation>
\n <affiliation>Parity</affiliation>
\n <affiliation>OASIS</affiliation>
\n </signature>
\n ",
}
}
"+picture
{
"$": {
$a$json": "
{
"Image": {
"Width": 800,
"Height": 600,
"Title": "Drummond at Graduation",
"Thumbnail": {
"Url": "http://www.example.com/image/481989943",
"Height": 125,
"Width": "100"
},
"IDs":[116, 943, 234, 38793]
}
}

}
,
"=web*markus":
[
"=drummond+friend"
]
},
"=drummond+home": {
"+email": "drummond@example.com"
},
"=drummond+work": {
"+email":
{
"=drummond@cordance": {
"+email": null
},
"=drummond@parity": {
"+email": null
}
}
},
"=drummond@cordance": {
"+email": "drummond.reed@cordance.example.com"
},
"=drummond@parity": {
"+email": "drummond.reed@parity.example.com"
},
"=drummond+friend": {
"$is$a":
[
"$contract",
"@identity.commons$contract",
"@identity.commons+personal$contract"
],
"$get":
{
"=drummond+home": null,
"=drummond+work": null
}
}
}




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]