Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convert JSON to a string #213

Closed
vortex314 opened this issue Nov 28, 2021 · 2 comments
Closed

convert JSON to a string #213

vortex314 opened this issue Nov 28, 2021 · 2 comments

Comments

@vortex314
Copy link

cbor_value_to_json() requires a FILE argument, to use in embedded system , it would be nice to convert this into a string output.
Is there a way to convert a CborValue to a JSON string representation ?

@thiagomacieira
Copy link
Member

You can use an in-memory FILE, like that returned by open_memstream

@vortex314
Copy link
Author

Hi Thiago, thanks a lot. I didn't know this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants