Skip to content

problem with new struct parsing syntax #688

Description

@ykochenkov

Hello.
We wrote a big product with the help of version 2.0.x. With this version we could write serializers like that:

EngineState::EngineState(const json& config) :
	userConfig(config.at("userConfig")),
	publicConfig(config.at("publicConfig"))
{}

EngineState::EngineState::operator json() const
{
	return{
		{ "userConfig", userConfig },
		{ "publicConfig", publicConfig },
	};
}

With the modern version of library this code is not compiled and to_json and from_json functions required.
Is there a way to fix that problem without rewriting the whole project?

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

    solution: proposed fixa fix for the issue has been proposed and waits for confirmationstate: 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