Questions tagged [jsonstream]

55 questions
15
votes
5 answers

how to handle json stream issued by spring boot 2 in angular 5

Spring boot 2 WebFlux generate Json stream in the new version for example @GetMapping(value = "stream", produces = APPLICATION_STREAM_JSON_VALUE) public Flux stream() { return Flux.interval(Duration.ofSeconds(1)).map(Data::new); } will…
ashraf revo
  • 767
  • 2
  • 12
  • 24
7
votes
2 answers

How to use streams to JSON stringify large nested objects in Node.js?

I have a large javascript object that I want to convert to JSON and write to a file. I thought I could do this using streams like so var fs = require('fs'); var JSONStream = require('JSONStream'); var st = JSONStream.stringifyObject() …
kevzettler
  • 4,783
  • 15
  • 58
  • 103
6
votes
1 answer

JQ How to merge multiple objects into one

Given the following input (which is a toned down version of the output with 100K+ objects of another complex query): echo '{ "a": { "b":"c", "d":"e" } }{ "a": { "b":"f", "d":"g" } }' | jq '.' { "a": { "b": "c", "d": "e" } } { "a": { …
JdeHaan
  • 332
  • 6
  • 19
5
votes
2 answers

how consume webflux end point producing json streams from React

I want to learn how consume WebFlux restcontroller producing streams of json from React. My first tentative forced me to parse to text instetad of json but I have the feeling I am doing something weird. I decided invest energy on reading examples…
Jim C
  • 3,957
  • 25
  • 85
  • 162
4
votes
1 answer

node.js - infinite loop during JSONStream

I've got a node.js server that is freezing in production, and it appears to be caused by an infinite loop inside of JSONStream. Here's a stack trace captured from a core dump from a frozen server: 1: toString [buffer.js:~392] (this=0x1e28fb6d25c9
ZECTBynmo
  • 3,197
  • 3
  • 25
  • 42
4
votes
1 answer

Error installing cordova

After running this command: sudo npm install -g cordova I get this error: npm ERR! notarget No compatible version found: JSONStream@'>=1.0.3-0 <2.0.0-0' npm ERR! notarget Valid install targets: npm ERR! notarget…
3
votes
2 answers

Best way to read a large JSON file

I currently have a 700M file and always end up with a Memory Limit when I try to read it (purpose: import data to FireStore using firestore nodejs sdk). I tried the following libraries: json-stream (https://github.com/uhop/stream-json) JSONStream …
Clement Montois
  • 184
  • 2
  • 12
3
votes
1 answer

Nodejs Parse Json file transform the input and write to file as JSON array

I need to read a very big location history file and extract some data and write to a file as JSON data. How can i do that. The following code doesn't generate any output. Edit: I expect to string output in the file, because it's piped into…
att
  • 617
  • 8
  • 17
3
votes
1 answer

parsing json streams using JSONPath and JSONStream

I have a stream of data like this: {"foo": 1} {"bar": 2} Note: no commas between these maps. I want to read this stream in node.js so that I can capture the two maps, as shown above. I have been trying to do this with JSONStream, which is good at…
clumsyjedi
  • 477
  • 6
  • 15
3
votes
3 answers

How to parse an infinite json array from stdin in go?

I'm trying to write a small replacement for i3status, a small programm that comunicates with i3bar conforming this protocol. They exchange messeages via stdin and stdout. The stream in both directions is an infinite array of json objects. The start…
Tristan Storch
  • 690
  • 8
  • 18
2
votes
1 answer

How can I read a .xz file in Python?

I am downloading files from the web with the ending .xz. It says they are JSONstrean files. Is there a way to read these files in Python, for example like a CSV file?
gython
  • 865
  • 4
  • 18
2
votes
1 answer

JSON object creation PushStreamContent

I have asp.net web api and has a HTTPResponseMessage and the api method name GetPersonDataStream, which actually stream each person object as a json. So when I see the result the actual Data has been constructed like two seperate object's with no…
Ramaswamy
  • 79
  • 1
  • 8
2
votes
1 answer

Using JSONStream to read large JSON files

I've been trying to read a file using JSONStream but I don't have much experience in this and it's been hard to find information (tutorials, documentation) about it. I found somewhere on here this piece of code: var fs = require('fs'), …
ifhy
  • 409
  • 1
  • 5
  • 10
2
votes
1 answer

How to write list of maps using Jackson Streaming API

Going through some reading, I saw below example for Jackson Streaming API. They are writing for one object (kind of one map). Can any one please help me on how to write multiple objects. Like a List of Maps. jsonFactory jfactory = new…
Balaji R
  • 33
  • 1
  • 6
2
votes
1 answer

node heap exhausted when piping JSONStream.parsed() data through es.map() and JSONStream.stringify() to file stream

I'm trying to pipe an input stream (created from a huge GeoJSON file) through JSONStream.parse() to break the stream into objects, then through event-stream.map() to allow me to transform the object, then through JSONStream.stringify() to create a…
nw31304
  • 151
  • 6
1
2 3 4