You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// a simple event consumer that collects string representations of the passed
// values; not inheriting from json::json_sax_t is not required, but can
// help not to forget a required function
class SaxTest : public json::json_sax_t
{
public:
std::vectorstd::string events;
no - please copy/paste the error message below
Severity Code Description Project File Line Suppression State
Error C2665 'nlohmann::detail::input_adapter': none of the 3 overloads could convert all the argument types WinVis C:\Users\johnsojo\source\repos\CorSI\packages\nlohmann.json.3.9.1\build\native\include\nlohmann\json.hpp 23966
Error C3536 'ia': cannot be used before it is initialized WinVis C:\Users\johnsojo\source\repos\CorSI\packages\nlohmann.json.3.9.1\build\native\include\nlohmann\json.hpp 23968
Error C2825 'InputAdapterType': must be a class or namespace when followed by '::' WinVis C:\Users\johnsojo\source\repos\CorSI\packages\nlohmann.json.3.9.1\build\native\include\nlohmann\json.hpp 6532
...
The text was updated successfully, but these errors were encountered:
I found issue in my code. I change:
bool result = json::sax_parse(sDataString, &SaxTest);
to
bool result = json::sax_parse(sDataString.GetString(), &SaxTest););
sDataString is defined as a CString and sax_parse() doesn't have a template to support CString but it does the type string.
I'm getting the following build errors on Microsoft Visual Studio Community 2019
Version 16.9.4 when I attempt to run the SAX Example:
I did the following:
https://nlohmann.github.io/json/api/basic_json/sax_parse/
Can you provide a small but working code example?
#include
#include
#include
#include <nlohmann/json.hpp>
using json = nlohmann::json;
// a simple event consumer that collects string representations of the passed
// values; not inheriting from json::json_sax_t is not required, but can
// help not to forget a required function
class SaxTest : public json::json_sax_t
{
public:
std::vectorstd::string events;
};
What is the expected behavior?
And what is the actual behavior instead?
Which compiler and operating system are you using?
Compiler: Microsoft Visual Studio Community 2019, Version 16.9.4
Operating system: Windows 10 Latest updates
Which version of the library did you use?
develop
branchIf you experience a compilation error: can you compile and run the unit tests?
Severity Code Description Project File Line Suppression State
Error C2665 'nlohmann::detail::input_adapter': none of the 3 overloads could convert all the argument types WinVis C:\Users\johnsojo\source\repos\CorSI\packages\nlohmann.json.3.9.1\build\native\include\nlohmann\json.hpp 23966
Error C3536 'ia': cannot be used before it is initialized WinVis C:\Users\johnsojo\source\repos\CorSI\packages\nlohmann.json.3.9.1\build\native\include\nlohmann\json.hpp 23968
Error C2825 'InputAdapterType': must be a class or namespace when followed by '::' WinVis C:\Users\johnsojo\source\repos\CorSI\packages\nlohmann.json.3.9.1\build\native\include\nlohmann\json.hpp 6532
...
The text was updated successfully, but these errors were encountered: