Feature request: to/from json serialization methods #179
mikegratton
started this conversation in
Ideas
Replies: 2 comments
-
Hi @mikegratton I think that is a nice suggestion, thanks for the proposal ! Nonetheless I am moving this to the proper discussion forum since it is not an issue. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I've created a basic version of the toJson() here: https://github.com/mikegratton/Fast-DDS-Gen/tree/feature/json The added method is Some notes:
Here's an example:
This serializes to json like
where a dummy map is inserted so that both names (the_union and x) are visible. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
For debugging apps that use IDL-derived types, it would be helpful to have to/from json methods. The toJson() method makes it easy to inspect any particular message without having to write extra code. The fromJson() method makes it easier to inject hand-made messages during testing, as the message content can be edited with a text editor.
Beta Was this translation helpful? Give feedback.
All reactions