I know this question is several years old and relates to Pharo 2, but in the current version of Pharo (6.1) there is a STONJSON class in the STON-Core package, which simplifies reading and writing data from JSON strings or streams:
| dict |
dict := STONJSON fromString: '
{
"flow": "milk",
"amount": 42.0
}'.
Transcript show: ( STONJSON toStringPretty: dict ).
source
share