Skip to content

Injecting class during serialization #1584

Description

@pkartner

I have a data class that I want to use during serialization to map a string value to something else.

static void from_json(const json& j, T& value) 
{
    // I want to use my data class here to map the value returned from json
    j.at("somevalue");
}

Is this currently possible with the library?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind: questionstate: stalethe issue has not been updated in a while and will be closed automatically soon unless it is updated

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions