Hacker News new | ask | show | jobs
by nolanl 3489 days ago
Yup, exactly. We use JSON.parse inside of a try/catch and then fall back to vuvuzela (https://github.com/nolanlawson/vuvuzela) which is a non-recursive JSON parser in cases of stack overflows (here's the code: https://github.com/pouchdb/pouchdb/blob/62be5fed959bbdf91758...).

Unfortunately the only way to resolve this without vuvuzela would have been to change the structure of the stored documents which would have required a large migration, so I'm glad to hear that the vuvuzela solution was the right way to go.