JSValue value = JSValue::parse("{\"name\": \"John\", \"age\": 30}"); Cell* cell = value.asCell(); std::cout << cell->getJSON() << std::endl;
JSValue value = JSValue::makeArray({1, 2, 3}); Cell* cell = value.asCell(); std::cout << cell->getTypeString() << std::endl;This code creates a JSValue object that represents an array of numbers and then extracts the underlying Cell object using the asCell method. It then prints the type of the Cell object to the console. Package/library: The JSValue asCell method is part of the JSON for Modern C++ library, which provides a simple and efficient API for manipulating JSON data in C++. The library is available on GitHub and can be installed using the CMake build system.