[Pharo-users] [From StackOverflow] How to parse ndjson in Pharo with NeoJSON

Esteban Lorenzano estebanlm at gmail.com
Thu Jan 21 06:02:33 EST 2016


Hi, 

there is a question I don’t know how to answer.

http://stackoverflow.com/questions/34904337/how-to-parse-ndjson-in-pharo-with-neojson

Transcript: 

I want to parse ndjson <http://ndjson.org/> (newline delimited json) data with NeoJSON <https://github.com/svenvc/docs/blob/master/neo/neo-json-paper.md> on Pharo Smalltalk.

ndjson data looks like this:

{"smalltalk": "cool"}
{"pharo": "cooler"}
At the moment I convert my file stream to a string, split it on newline and then parse the single parts using NeoJSON. This seems to use an unnecessary (and extremely huge) amount of memory and time, probably because of converting streams to strings and vice-versa all the time. What would be an efficient way to do this task?


Takers?
Esteban
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/attachments/20160121/5c691eca/attachment.html>


More information about the Pharo-users mailing list