Does anyone know if there have been any efforts or plans to create a C++ version of gson? The library is very helpful and one the easiest to use and it would be great if there was something similar for C++/
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You mean the google project to convert json into java objects and back?
There are c++ json libraries but from what I understand, the advantage of gson is the ability to automatically serialize objects.
The problem that makes this difficult, and impossible to do as well as in other languages is that C++ doesn’t support reflection, and has basically zero run-time type info. This makes something like gson about impossible to do in a similar manner.
Take this with a grain of salt because while I do have a whole lot of C++ experience. I’ve never actually used gson, and thus don’t really know what it is you desire.