Questions tagged [stream-json]

NodeJs stream-json library.

stream-json is a micro-library of node.js stream components with minimal dependencies for creating custom data processors oriented on processing huge JSON files while requiring a minimal memory footprint. It can parse JSON files far exceeding available memory. Even individual primitive data items (keys, strings, and numbers) can be streamed piece-wise. Streaming SAX-inspired event-based API is included as well.

3 questions
2
votes
1 answer

filter bad json values from json in a memory efficient way

We have some bad json we're trying to parse. Unfortunately it isn't valid json as it returns unquoted NaN's in the payload. We are switching from the long deprecated request library to axios. This seems to have doubled our memory usage of our…
xenoterracide
  • 16,274
  • 24
  • 118
  • 243
0
votes
0 answers

Read value at index in a huge json array

I need to get the value at a given index in a json array containing millions of entries. The json file looks a bit like this: [ {"street":"123 Here street", "city":"Here city"}, {"street":"456 There street", "city":"There city"} ] I can get…
0
votes
1 answer

How to stream json data from one nodejs server to another and process it at the receiver at runtime?

what I'm basically trying to achieve is to get all items of a mongodb collection on a nodejs server, stream these items (in json format) over REST to another nodejs server and pipe the incoming readstream to stream-json to persist the parsed objects…
gold
  • 1
  • 3