Skip to content

Parsing problem with new reader #511

Closed
@cmaeckel

Description

@cmaeckel

The parser is accepting "{}foobar" as valid JSON. The code fragment is:

Json::CharReaderBuilder reader;
reader.strictMode( &reader.settings_ );
std::istringstream chrStream( "{}foobar" );
Json::Value root;
std::string errs;
bool result( Json::parseFromStream( reader, chrStream, &root, &errs ) );
std::cout << "Result " << result << " errs " << errs << std::endl;

And result comes back as true in this case and writing out the resulting JSON returns "{}". Or am I doing something wrong?

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