Sven Van Caekenberghe wrote:
Norbert, Dale, et al,
On 24 Apr 2012, at 18:43, Norbert Hartl wrote:
What is STON and STON-object syntax?
Arhh, it is not yet finished, I did it for myself, not for trying to convince the world, since that it too hard anyway.
This is the work-in-progress paper:
------------------------------------------------------------------------
The code lives here: http://ss3.gemstone.com/ss/STON
It is a slight variation of JSON, adding some Smalltalk concepts, as well as a solution to the class problem.
But again, I am not trying to convince anyone to use this, I did it as a proof of concept for myself, and I kind of like it.
On the other hand, JSON is so ubiquitous that I wonder a bit, why bother ?
Sven
-- Sven Van Caekenberghe http://stfx.eu Smalltalk is the Red Pill
The human readability is a strong point of JSON & STON, but is there any requirement for "human edit-ability" by which I mean in a text editor? In which case the referencing objects by counting "OrderedCollection [ Point [1, 2], @2, @2 ]" would be fragile, since insertion of an object via text editor would offset all references. Something like "OrderedCollection@1 [ Point@2 [1, 2], @2, @2 ]" would be more robust. However if you expect to never need to edit the STON file in a text editor, this point is mute. The downside of this idea is a bit more cluttered look. However I notice that evaluating #123 in Workspace returns an integer rather than a ByteSymbol. So it would seem that #123 would never be written out in STON format (from Pharo), which means "OrderedCollection#1 [ Point#2 [1, 2], #2, #2 ]" might be a less cluttered option, or perhaps a mix like "OrderedCollection#1 [ Point#2 [1, 2], @2, @2 ]" doesn't detract too much from readability. Actually I think this enhances readability anyhow, since if there are a lot of object references in the STON file, in a text viewer I would have to need to manually count them to follow the references. cheers -ben