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

Enum class support #45

Closed vrimar closed 1 year ago

vrimar commented 1 year ago

Is there a way to serialize enum class props without a custom TypeHandler?

Example:

enum class MyEnum : int {

}

struct MyObject {
   MyEnum myEnum;

   JS_OBJ(myEnum);
}
vrimar commented 1 year ago

Apologies, looks like JS_ENUM does what I need!