-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can I get this simple example working? #1926
Labels
Comments
Instead of |
Thankyou! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I want to see a simple example working before integrating into my library. The following code (single file) compiles ok but the json dump is an empty array. It doesn't seem like the to_json and from_json functions are ever being called but I get no warnings or exceptions thrown. How do I modify this code to get something working?
I am using conan to provide nlohmann_json using this
conanfile.txt
and my
CMakeLists.txt
file is simplyDescribe what you tried.
Have tried breaking into separate header file to contain the class and conversion functions and a main file. Have tried using structs instead of classes and providing more constructors as per the instructions.
Describe which system (OS, compiler) you are using.
Ubuntu 18.04, gcc version 9.2.1 20191008
Describe which version of the library you are using (release version, develop branch).
nlohmann_json/3.7.0
Thanks in advance
The text was updated successfully, but these errors were encountered: