After the earlier post on JSON, I decided to take a look at the Squeak package. Importing it into Cincom Smalltalk was fairly simple - here are the steps I used:
- Downloaded the mcz file
- Unzipped it to get the files
- Loaded BraceConstructor and FileOut30 into my image. The former is for Squeak array compatibility; the latter handles bringing in Squeak files
- During the file in, I had to deal with namespace issues (TestCase), and a missing class (SystemOrganization)
- Fix up all the uses of _ instead of :=
- Create a new namespace and move all the JSON classes into it
- Test out a few examples, found here.
I published it as JSONReader in the public store (there's a JSON package out there already - it seems to be focused on serializing to JSON). I should probably consider unifying the two. Anyway, I can't vouch for this code much - but it's a start.
Technorati Tags:
smalltalk, json