Paul Hoffman | 1 Jun 03:24
Picon

Re: Structured data over TCP?

At 12:50 PM -0500 5/29/09, Nicolas Williams wrote:
>Therefore, if you have a volatile API then you need to have a way to do
>versioning if you use JSON.  Then again, if you have data that has a
>long at-rest lifetime, then you really want to specify its schema
>somewhere, and once you're at that point you're better off with XML.

What is the problem with starting your JSON with a string that identifies the schema? { {"uid" : "97ad72a2"}
{ "count" : 42 } .... }. A parser can look for the first item in the structure and be sure that it exactly
matches what it expects.

Gmane