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
This is my test: I create a json object, and I want save it to a file, and open it after. Unfortunately, the first step could not be completed. read json object directly is not possible.
{"compiler":{"c++":"202002","family":"msvc","version":1934},"copyright":"(C) 2013-2022 Niels Lohmann","name":"JSON for Modern C++","platform":"win32","url":"https://github.com/nlohmann/json","version":{"major":3,"minor":11,"patch":2,"string":"3.11.2"}}
j.type_name()=array
[json.exception.type_error.305] cannot use operator[] with a string argument with array
Minimal code example
No response
Error messages
[json.exception.type_error.305] cannot use operator[] with a string argument with array
Apparently, you did not create an object, but an array. Please double check that you provide a list of pairs to the constructor, where the first element of each pair is a string.
Description
This is my test: I create a json object, and I want save it to a file, and open it after. Unfortunately, the first step could not be completed. read json object directly is not possible.
run the exe will be display a error: [json.exception.type_error.305] cannot use operator[] with a string argument with array
Reproduction steps
copy code and run
Expected vs. actual results
Expected:
{"addr", 0x011B90C4},{"offest", {}},
actual results:
Minimal code example
No response
Error messages
Compiler and operating system
"compiler":{"c++":"202002","family":"msvc","version":1934},"copyright":"(C) 2013-2022 Niels Lohmann","name":"JSON for Modern C++","platform":"win32","url":"https://github.com/nlohmann/json","version":{"major":3,"minor":11,"patch":2,"string":"3.11.2"
Library version
3.11.2
Validation
develop
branch is used.The text was updated successfully, but these errors were encountered: