minio / simdjson-go

Golang port of simdjson: parsing gigabytes of JSON per second
Apache License 2.0
1.8k stars 85 forks source link

Delete null values #85

Closed ivanjaros closed 6 months ago

ivanjaros commented 6 months ago

I want to remove all null values from json. Presently I am doing it manually with bytes.Index() but it is not performing as good as I would like it to.

Since this has iterator, is there a way to walk the tree and delete null values and produce altered json? I see in documentation that I can delete(though I don't get it really with the typing) child elements. So I think it should be possible, any hints on how?

fwessels commented 6 months ago

This json library is primarily aimed at high performance parsing of JSON data. Modifying the tape that is produced by the parser provides suboptimal performance, so this isn't a great use case for this library.