Skip to content

consider adding a bool json::is_valid(std::string const&) non-member function #541

Description

@user1095108

Consider this scenario. An arbitrary string is provided to an app. The string is supposed to contain valid json, but the app has no way of knowing this. It tries to parse the json with json::parse(), but exceptions are disabled. This means, if the json is not valid, std::abort() will be called and the app will abort and there is no way to prevent this from happening.

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: duplicatethe issue is a duplicate; refer to the linked issue instead

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions