Is it possible to deserialize a json array item by item from a Stream, without having to load the whole thing first?
I have a large JSON export file I need to read it it but want to process each item at a time, then get the next one.
Is it possible to deserialize a json array item by item from a Stream, without having to load the whole thing first?
I have a large JSON export file I need to read it it but want to process each item at a time, then get the next one.
Not with the JSON Serializer, you’ll need to do some string manipulation and parse it manually.
If you’re lucky and each array is on a new line, the lazy Stream.ReadLines()
extension method may help.