tinycbor icon indicating copy to clipboard operation
tinycbor copied to clipboard

Add API for outputting JSON to stream

Open soburi opened this issue 3 years ago • 3 comments

Add cbor_value_to_json_stream() function to output to a stream for JSON. It has similar behavior with cbor_value_to_pretty_stream(), output JSON text instead of pretty formatted text.

cbor_value_to_pretty_stream() that is used to mapkey-to-text convertion can take over output stream continuously from JSON output process. Converted text can output directly to a stream, no more need to buffering with memstream.

The modification makes the source more portable and reduces the frequents of dynamic memory allocations.

soburi avatar Aug 10 '20 04:08 soburi

3 days and Travis hasn't run yet...

thiagomacieira avatar Aug 13 '20 15:08 thiagomacieira

Travis is back! I hope you can review at it when you have time.

soburi avatar Aug 25 '20 22:08 soburi

Will do. Just really busy at work.

thiagomacieira avatar Aug 27 '20 01:08 thiagomacieira