Skip to content

https://github.com/seaweed-code/AUTOJSON #2368

@seaweed-code

Description

@seaweed-code

https://github.com/seaweed-code/AUTOJSON
#include "JsonTransformAuto.h"

struct Person {
std::string name;
int32_t age;
DECLARE__JSON__AUTO__TRANSFORM // inject serialize/deserialize methods
};
IMPLEMENT__JSON__AUTO__TRANSFORM(Person, name, age)

Person p;
p.name = "Bob";
p.age = 25;
std::string json = p.transform_to_json();
// json == {"name":"Bob","age":25}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions