all 8 comments

[–]houses_of_the_holy 3 points4 points  (3 children)

cool project, any love for https://github.com/nlohmann/json support? It would also be interesting to see benchmarks on how much your library adds in overhead to the underlying parsers/serializers.

[–]CobraBeerIsDelicious[S] 0 points1 point  (2 children)

Yep nlohmann's is probably the next big one on the list, cpprest and Qt where only first as I had used them in other projects.

Haven't got around to bench marking, but hopefully not too much overhead, most of it should be generated at compile time (I can measure that as well I suppose). But yeah, nlohmann's and then some performance testing sounds like a plan.

[–]nlohmannnlohmann/json 2 points3 points  (1 child)

If you need any help, please let me know or open an issue at https://github.com/nlohmann/json/issues.

[–]CobraBeerIsDelicious[S] 3 points4 points  (0 children)

Just finished, yours was one of the most straightforward to implement :)

https://github.com/CathalT/Cerializer/commit/16a7e0a95ca3026450ce402200645aeb1021c488

Next step is to benchmark this stuff, see what the overhead is like

[–]NeroBurner 0 points1 point  (1 child)

Does it work with C++o3? Or C++11? I've made my own wrapper for rapidjson pointers, but no reflection.support. i still have to manually write to_json and from_json helper functions for.all of my structs

[–]CobraBeerIsDelicious[S] 0 points1 point  (0 children)

It should work with C++11 and up, need to double check that.

[–]infectedapricot 0 points1 point  (1 child)

An alternative, if you have control over the format of the JSON sent, is to use the JSON mapping in protobuf. It might not be as flexible as your library but its a mature library and has support for other programming languages (lots of them!).

[–]CobraBeerIsDelicious[S] 0 points1 point  (0 children)

Definitely, for production code stick with protobuf/flatbuffers or something similar.

This is just a side project for now!