david(a)lang.hm writes:
I think that the only good reason for doing having the inline stuff
is
for a template based API. Over the wire it would be far better for
everything to be nested JSON so that all recipients only need to know
JSON.
A template based API can use dot-notation. That is the standard way in
javascript to reach into objects anyway, and people dealing with JSON
are most probably already familiar with it.
You can use dot-notation in the API, and behind the courtain, it will
turn it back to structured data on the wire.
So there is an existing, already understood and wide-spread way to reach
into objects and pretty much accomplish everything the object!field
stuff does: dot-notation. But it should not appear on the wire.
I understand the need to standardize how a structure can be 'flattened'
and how one can access the various parts of it using a template-ish API,
but this should be separate from the on-the-wire format, and should - in
my opinion - be dot-notation, as that's something already well
understood.
--
|8]