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

JSON serialization support #9

Open
mgrojo opened this issue Mar 31, 2022 · 2 comments
Open

JSON serialization support #9

mgrojo opened this issue Mar 31, 2022 · 2 comments

Comments

@mgrojo
Copy link
Collaborator

mgrojo commented Mar 31, 2022

Is JSON serialization supported? I suppose the answer is not, although I see some reference to JSON in the source.

Do you know if one could take the wire representation and then import json_util.h to get a JSON string? I suspect that it won't have the field names to make it.

@reznikmm
Copy link
Owner

reznikmm commented Apr 1, 2022

Hello!
No, currently JSON serialization isn't supported now. As I see functions in json_util.h requires TypeResolver object. If you find a way to create such an object, then they should work.

@mgrojo
Copy link
Collaborator Author

mgrojo commented Apr 1, 2022

I suppose it could be obtained using the C++ generator, but what about doing it from Ada? I'm curious about what this code is for:

PB_Support.IO.Read (Stream, Key.Encoding, V.Json_Name.Value);

It seems that it's loading the JSON field names. If the data is actually loaded, it's a matter of adding the code to read the information and print the data in JSON format. Is that a workable approach?

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