deserialize json

2 posts / 0 new
Last post
Offline
Last seen: 2 years 3 weeks ago
Joined: 12/01/2022
Posts: 1
Retrieve integer enumeration value

Hello!

I'm reading a dds log file using sqlite and having troubles to retrieve the original integer values that were specified for enumerations in my *.idl file.

For example:

enum tTest
{
  Value0,
  Value1, 
  Value2
}

struct tMyData
{
  tTest testData;
}; 

When I read testData, I want to get the integer values 0,1 or 2. But instead the json string contains "Value0", "Value1" or "Value2". Is there some setting that I miss during the recording?

Any help is highly appreciated!

/David

Organization:
9 posts / 0 new
Last post
Offline
Last seen: 1 year 10 months ago
Joined: 04/06/2021
Posts: 6
How to deserialize from json or text format?

Is there a way to deserialize from json (or other plain text format), just like prototxt in google protobuf?

thanks.

see: text_format.h  |  Protocol Buffers  |  Google Developers 

Subscribe to RSS - deserialize json