On Thu, Dec 13, 2018 at 12:33 PM Thompson, David <dthomps...@worcester.edu> wrote:
The catch is that '() becomes both the empty array and empty > object so there's no way for the serializer to do the right thing all > the time. You could introduce a special value for one of those cases, > and hey we're back at square one! ;) > Ouch, yes. I suppose the Final Answer is to have a JSON config object which specifies the protocol for creating, populating, and dissecting objects (and maybe arrays, unless everyone can agree they are lists), essentially a record of procedures. That way everyone can do what they want -- but it complicates building programs on top of such an overly flexible library. It's a hard problem. So far the workable solutions seem to be: lists for arrays, hash tables for objects lists for arrays, vectors of pairs for objects vectors for arrays, alists for objects None are ideal. -- John Cowan http://vrici.lojban.org/~cowan co...@ccil.org Be yourself. Especially do not feign a working knowledge of RDF where no such knowledge exists. Neither be cynical about RELAX NG; for in the face of all aridity and disenchantment in the world of markup, James Clark is as perennial as the grass. --DeXiderata, Sean McGrath > - Dave >