VASmalltalk – JSON and the delivered JSJsonParser

Perhaps you have noticed, that in VASmalltalk, there is a built-in JSON parser. It’s the class JSJsonParser in the subapplication JavascriptCoreJSON. Using this class you may read any JSON stream and get a dictionary containing all resulting values you would expect from that class. It works pretty well, comes with VASmalltalk, is written in Smalltalk, but has – in my opinion – two drawbacks:

  • This application also needs Seaside as a prerequisite – sometimes in fat client infrastructure not a needed feature
  • It assumes, that the server has the same code page as the client or to be more precise: the code point of a character transmitted by the server is assumed to be the same in the client.

If you want to connect to pure UTF8 databases like CouchDB this parser is not that useful and you need either to subclass it or use a different one.

By the way, the application JavascriptCoreJSON also contains stuff to create JSON oriented stuff on a stream.

Sorry to say, but all that stuff is not mentioned in the documentation

This entry was posted in Smalltalk. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s