Skip to content

json::dump() silently crashes if items contain accented letters #1365

@pietro68

Description

@pietro68
  • If a string field contains accented letters (e.g. à è ), a json::dump to std::string will silently crash

  • run this simple snippet:
    void foobar() { using namespace nlohmann; json foo = { "resumè" }; std::string bar = foo.dump(4); }

  • I expect the .dump operation to complete without problems...

  • ...but instead, it silently crashes (i.e. control flow goes out of scope of foobar() )

  • compiler: Visual Studio 2015 version 14.0.25431.01 update 3; Windows 10

  • Did you use a released version of the library or the version from the develop branch? yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions