jorgen / json_struct

json_struct is a single header only C++ library for parsing JSON directly to C++ structs and vice versa
Other
422 stars 57 forks source link

Added timestamp serialization (uint64_t <-> std::chrono::timepoint) #37

Closed talhasaruhan closed 2 years ago

talhasaruhan commented 2 years ago

Only compiled if JS_STD_TIMEPOINT is defined.

talhasaruhan commented 2 years ago

On a second look, it requires std::enable_if and if constexpr, so the proper compiler checks might be needed before enabling this feature, depending on the intended target of the library.

jorgen commented 2 years ago

I think its ok if the user enables the define JS_STD_TIMEPOINT that it requires extra functionality. However, can you please add a unit test?

talhasaruhan commented 2 years ago

Added the tests.

jorgen commented 2 years ago

Awesome, I can fix the ci later today

talhasaruhan commented 2 years ago

Cool 👍