Skip to content

basic_json has no member "parse" #1731

Description

@Ruud-cb
  • What is the issue you have?

Copied the json.hpp file (v3.7.0) from release into my C++ project, the IDE (VS2019) instantly reports problems with 2 issues:

class "nlohmann:basic_json<std::map, std::vector, std::string, bool, int64_t, uint64_t, double, std::allocator, nlohmann:adl_serializer>" has no member "parse".

https://github.com/nlohmann/json/blob/develop/single_include/nlohmann/json.hpp#L22516

And one error I am a little bit less concerned about because I don't need it to parse a json:

class "nlohmann:basic_json<std::map, std::vector, std::string, bool, int64_t, uint64_t, double, std::allocator, nlohmann:adl_serializer>" has no member "swap".

https://github.com/nlohmann/json/blob/develop/single_include/nlohmann/json.hpp#L22495

  • Please describe the steps to reproduce the issue. Can you provide a small but working code example?
  1. Create a new C++ Dynamic Link Library Project in VS2019
  2. Add json.hpp
  3. See errors

Visual Studio 2019 (v142)
Also tried Visual Studio 2017 (v141) but that even gave me more issues.

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

  • If you experience a compilation error: can you compile and run the unit tests?

FYI: I am a C++ noob

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions