I’ve just uploaded a port of STON, the Smalltalk Object Notation for VA Smalltalk to the VASTGoodies.com repository.
The code is quite compact and well-done. I had to change a few things, mostly in the tests, due to language constructs that are supported in Pharo Smalltalk but not in VAST.
What can STON be used for? The options are numerous, but there are a few highlights I’d like to mention and that I found it promising for:
- Use it as as simple persistence mechanism to save objects (like XML, but easier to edit)
- Exchange data between two Smalltalk dialects or Smalltalk and any other language that speaks JSON/STON
- Exchange Smalltalk objects with a web application implemented in Amber.js
- you can surely think of others…
STON is extremely simple to use and performance is not too bad for reasonable amounts of objects. More details about STON can be found on its github page.
So I’d be interested in hearing if STON is being used in the VA ST world and of course also about bugs and possible extensions.
STON also is the basis of Cypress, which is intended to make version control of Smalltalk code in “normal” source control systems like git or mercurial simpler. Who knows, maybe cypress one day even allows for exchange of smalltalk source code between smalltalk platforms with at least some level of automatic code conversion.