getml / reflect-cpp

A C++20 library for fast serialization, deserialization and validation using reflection. Supports JSON, BSON, CBOR, flexbuffers, msgpack, TOML, XML, YAML / msgpack.org[C++20]
https://getml.github.io/reflect-cpp/
MIT License
901 stars 76 forks source link

added a new method of implementing a custom parser using a Reflector … #142

Closed BjornSAIM closed 1 month ago

BjornSAIM commented 1 month ago

see: https://github.com/getml/reflect-cpp/issues/141

liuzicheng1987 commented 1 month ago

A couple of quick comments:

  1. Could you add a test (only for JSON, there is no need to copy + paste it into all the formats)?
  2. Could you also add some documentation on how to use your class? (If it's too much of a hassle, I can do it as well, no problem).
  3. Very minor thing: In this library, we generally use CamelCase for types and classes...so could you rename "refl_type" into something like "ReflType"?
liuzicheng1987 commented 1 month ago

But it is such a great idea, thank you so much!

BjornSAIM commented 1 month ago

A couple of quick comments:

  1. Could you add a test (only for JSON, there is no need to copy + paste it into all the formats)?
  2. Could you also add some documentation on how to use your class? (If it's too much of a hassle, I can do it as well, no problem).
  3. Very minor thing: In this library, we generally use CamelCase for types and classes...so could you rename "refl_type" into something like "ReflType"?

check, check and check

liuzicheng1987 commented 1 month ago

@BjornSAIM , this looks great.

If the tests run through fine, I will merge it. I'm actually currently on a train and have almost reached my location, so I won't be able to merge it right now. But it will find some time some time today.

Thank you so much for your contribution!

liuzicheng1987 commented 1 month ago

@BjornSAIM and @DaedieCool , sorry, I had a very busy weekend so I didn't get to merging this until now. But, again, thank you so much for this great addition to the library.