Closed pka closed 8 months ago
a couple relevant issues in the popular json libraries:
Apache Arrow has a batch reader: https://github.com/apache/arrow/blob/master/rust/arrow/src/json/reader.rs
Rust library for encoding and decoding JSON streams.: https://docs.rs/destream_json/
https://github.com/jeremiah-shaulov/nop-json: Deserialization of JSON io::Read stream into primitive types, Strings and any other types.
EDIT: Currently nighly only.
https://github.com/serde-rs/json-benchmark/blob/master/src/canada.rs contains a GeoJSON benchmark.
Arrow implementation is now at https://github.com/apache/arrow-rs/blob/master/arrow/src/json/reader.rs.
Arrow implementation is now at https://github.com/apache/arrow-rs/blob/master/arrow-json/src/reader/mod.rs 🙃
Was this issue intended to be closed by #16?
I think so!
The current GeoJSON reader is based on https://github.com/georust/geojson which reads the whole file into memory.
A few unsuccessful attempts are in https://github.com/pka/geozero/tree/parse-geojson-with-serde:
I also had a deeper look at https://github.com/Geal/nom, which has a streaming interface. But I didn't find a good way to continue after a "Buffer empty" error.