Converting json to structure with char* types #4029
kevinmoloney7
started this conversation in
General
Replies: 1 comment
-
The library stores const std::string& name = j.at("value1").get<const std::string&>(); |
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
-
I have the following code which works fine with a basic stucture containing an int and std::string types. I have made a custom helper to convert the raw json to my structure type.
The issue I am having is that my code needs the
std::string
types to bechar *
as this code is in a dll and the structure is passed from an application built with a different compiler. This structure is much larger in reality but I have seen potentially using something like this infrom_json
Is their an alternative cleaner approach that could be taken here
Beta Was this translation helpful? Give feedback.
All reactions