JSOX icon indicating copy to clipboard operation
JSOX copied to clipboard

Collaborations with JSON5's standardization

Open DonaldTsang opened this issue 6 years ago • 2 comments

See https://github.com/json5/json5/issues/190 for more info

DonaldTsang avatar Jun 15 '19 06:06 DonaldTsang

Thanx for the heads up;; I'll consider my response :)

d3x0r avatar Jun 15 '19 08:06 d3x0r

Again, thank you for the heads up; I was hoping a community of similar minds might help solve some of my questions about where/how to go from here. But; this has been quite complete for a while (although I have rattled a few edge cases loose recently), I've been using this continuously for simple things like dates and simplified message formatting... {op:"doSomething,arg:"blah"} Sorry, I'm rambling a bit... I did like the idea of implementing some round-tripping of comments; but this implementation isn't even 2 layers like the C node plugin, which parses the tree into a abstract tree, and then converts that to JS objects, this converts the objects as it goes along; which has caused issues reviving a structure which points to itself as the first member of some child structure :) But, without the multiple passes, I don't even have a place to save the comments at this time....

I have though that a potential speedup/rearchitect of this would do a high level scan of structure characters []{}:, and if one was clever really just : and , to get the shape of it, and perhaps save the start of identifier/string references, and a second pass to massage it into real objects; in C, this would let me measure early, allocate all the working space, in one block, and then parse into it.... But, that also assumes that the content being parsed is already completed, and isn't a partial stream of packets...

d3x0r avatar Nov 12 '19 00:11 d3x0r