Custom output writer
Created by: sn00pster
I am using the library on an application that does not use Arduino, therefore to output to a custom “output” i am limited to either using a buffer or using ostream.
I cannot use ostream as including it takes my flash usage up by an amount to the point that my application doesn’t fit into flash anymore.
There should be a lightweight class, much like the String stream writer which can be subclassed and used as the output.
i’m currently having to patch the source of the library to add my own class to achieve this.
In situations where you don’t have Arduino Print class or ostream then a lightweight alternative would be a great solution.
Ideally after serialization is complete Arduino json would call a function in the class to finalize, this would allow and underlying data that hasnt been output to be output, in the case of writing to a block device directly.