Replies: 1 comment 5 replies
-
|
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Note: solved! See Niels reply - I hadn't used a const json & in from_json.
I'm a bit stumped here. I am just getting started setting up json config export/import for my small test application. So far I have successfully exported and imported a couple of custom data types (my classes), I am aware of the namespace requirement, but I have one class that happens to be the main class for my application which for some reason the from_json is not being recognised.
E.g. my class is called TestApp::App. A class called IO_json has a member _j which is a nlohmann::json,
I can do this:
and to to_json is called correctly, output looks good.
However I can not compile the following:
I get the following:
to and from json looks pretty standard:
I have quite a few members in my TestApp class; I presumed that I don't need to define conversions for them all just yet? Any ideas where I can look to figure this out?
I'm using the latest develop build and visual studio 2019 Version 16.7.6
Beta Was this translation helpful? Give feedback.
All reactions