[Dojo-interest] Re: Still working with JSON Object to FilteringTable

Tom Trenka dojo-interest at dept-z.com
Sun Feb 4 09:26:04 MST 2007




Ross Thomas wrote:
> 
> 
> 
>> How does one know apriori what data to expect so that you can feed
>> the store the proper argument?
>> 
> 
> You need to have prior knowledge.  This is the compromise between
> JSON & XML.  JSON is not implicitly self-descriptive.  It is also what
> makes JSON so much more lightweight compared to XML.
> 
> You can use additional properties in your JSON data to describe
> the returned data.  But that would be a 'contract' between you and
> the data provider.
> 
I'd just like to add here that it's very, very rare that you don't have
prior knowledge of the data structures you are looking to create a view of;
this is the whole point of things like XSD/XSI/DTD, etc.  Discovering a data
structure on the fly is more often the province of a database engine, and
even then you are still required to define metadata first.  This is one of
the main reasons why JSON has become very popular as a data transport
format.

I've seen quite a few people chasing this particular goose chase--I've been
one myself--and as with my opinion on elements and event handlers, I think
that from a very practical point of view, designing an app to try to
discover metadata as the foundation for that app will result in something
that is very slow and very, very complex--much more complex than it needs to
be.

trt
-- 
View this message in context: http://www.nabble.com/Re%3A-Still-working-with-JSON-Object-to-Filtering-Table-tf3162406.html#a8794278
Sent from the Dojo mailing list archive at Nabble.com.



More information about the Dojo-interest mailing list