jprichardson / node-jsonfile

Easily read/write JSON files.
MIT License
1.2k stars 321 forks source link

Invalid JSon after appending new object #134

Closed LUK3D closed 4 years ago

LUK3D commented 4 years ago

jsonfile.writeFileSync(file, obj, { flag: 'a', spaces: 2 }) give an invalid json. Theres no coma between two objects

image

RyanZim commented 4 years ago

The append option will produce Newline-delimited JSON, which cannot be read by this module.

i-break-codes commented 1 year ago

@RyanZim then what's the point of readySync option when it doesn't support file read?

RyanZim commented 1 year ago

It reads normal JSON, not Newline-delemited JSON