Skip to content

Where is json::parse now? #1702

Description

@pmahend1
  • Describe what you want to achieve.
    Trying to parse a string into json and then extract values and create object
    image

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"

Getting error 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"

  • Describe what you tried.
#include <iomanip>
#include <fstream>
#include <sstream>

#include <iostream>
#include <nlohmann/json.hpp>

using json = nlohmann::json;
using namespace std;
.
.
.
int main(){
	auto j3 = json::parse("{ \"happy\": true, \"pi\": 3.141 }");
}
  • Describe which system (OS, compiler) you are using.
    Windows 10
  • Describe which version of the library you are using (release version, develop branch).

VCPKG

nlohmann-json:x64-windows                          3.7.0            JSON for Modern C++
nlohmann-json:x64-windows-static                   3.7.0            JSON for Modern C++
nlohmann-json:x86-windows                          3.7.0            JSON for Modern C++
nlohmann-json:x86-windows-static                   3.7.0            JSON for Modern C++

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions