[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XMON
Michael, what is a "JSON tree"? I suppose you mean the data model used to capture the content of JSON text. Many people take it for granted that a tree of nested arrays and maps is the *natural* way to capture JSON data. (JSONiq is a variant on that theme.) Be this as it may, yet I know from daily experience that it can be tremendously impractical when dealing with really complex data, with many tree levels and very many items. So the choice of a tree of arrays and maps is certainly not always the best one. As we all know - there are also various implementations of parsing JSON data into an XML node tree. A good example is the BaseX extension function json:parse. The resulting documents are as a rule excellently readible, hardly less than ordinary XML data, and the ease of processing is of course exactly the same as when dealing with original XML. You can say things like //offer[.//flight/@isDirect] - and this means say in a half line what would otherwise require much more code, which is less readable, more brittle and much more difficult to maintain. This is not only a question of "tool chains" enabled (XPath, XQuery, XSLT), in my opinion there is more to it. It means that JSON data parsed into a node tree representation are intuitively, and globally unambiguously, addressable: like XML data. With kind regards, Hans-Juergen Michael Kay <mike@saxonica.com> schrieb am 11:25 Donnerstag, 4.Mai 2017: It would probably be a good idea to re-read the FtanML proposal at I don't think it got everything right, but I think it contains some good ideas along these lines. At the level of tree models I have come to realise that there is a fundamental difference between XML tree models and JSON tree models that has nothing to do with the differences in syntax: XML trees have parent pointers, JSON trees don't. As I tried to show in my XML Prague paper last year, this has surprisingly far-reaching effects on the design of a transformation language. Michael Kay Saxonica
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|