json-stream-stringify icon indicating copy to clipboard operation
json-stream-stringify copied to clipboard

Element in array is not serialized randomly

Open nachogiljaldo opened this issue 4 months ago • 0 comments

I have some code that returns:

{
  someProperty: 1,
  items: <a stream in objectMode result of performing a query and transforming its values>
}

Randomly, I get things rendered like it follows:

{
  "someProperty": 1,
  "items": [
    {"id": 1},
    {"id": 2},
    ,
    {"id": 3},
    ,
    ...
  ]

As you see it generates invalid json. I have been trying to debug and understand what is going on. But unfortunately I cannot reproduce and I did not manage to generate a stream of objects that produces this.

nachogiljaldo avatar Sep 25 '24 21:09 nachogiljaldo