I have a Stream
containing a collection of objects serialized into JSON, for example:
{"Name":"Alice","Age":20}{"Name":"Bob","Age":30}{"Name":"Charlie","Age":35}{"Name":"Danielle","Age":50}...
This stream may be very large so I want to process the items as they come in rather than reading the entire stream into a string. Also if the stream is a network stream it be open indefinitely.
Some of the objects may be quite complex so I would like to take advantage of the JSON serialization provided by JSON.NET.
Is there a way I can use Newtonsoft Json to convert the stream into an IObservable<Person>
and process the items reactively as they arrive?