Adobe’s JSON serialization library is very helpful, but it can lock up the UI if parsing a large string. I am wondering if it makes sense to parse JSON in a pseudo-thread (aka “chunking”).
I am wondering if anyone has implemented, has suggestions for implementing, or arguments against this approach.
let’s just say, it’s sufficiently complicated …
JSON parsing is recursive, and the state of the parsing automaton is maintained in the stack … if you want to chunk it down, you’ll have to maintain the state for yourself … i don’t know of any libraries doing that … you might want to have a look at the state pattern …
if you have LARGE data amounts, then JSON probably isn’t the best of choices, mostly because of the redundancies … you might wanna switch to something like CSV … it’s more compact, easier to parse, and requires no recursion, thus can easily be run in a green thread.