开发者

Efforts or plans to port gson to C++

开发者 https://www.devze.com 2023-02-08 22:54 出处:网络
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 som

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++/


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消