ROS 2 type support introspection and conversion of C/C++ messages to/from YAML

You may be interested in this other post