iBet uBet web content aggregator. Adding the entire web to your favor.
iBet uBet web content aggregator. Adding the entire web to your favor.



Link to original content: http://github.com/danielaparker/jsoncons/issues/310
Need more debug output for datatype mismatch · Issue #310 · danielaparker/jsoncons · GitHub
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need more debug output for datatype mismatch #310

Open
chilarai opened this issue Mar 21, 2021 · 2 comments
Open

Need more debug output for datatype mismatch #310

chilarai opened this issue Mar 21, 2021 · 2 comments

Comments

@chilarai
Copy link

chilarai commented Mar 21, 2021

I am using the json.hpp file with Qt5 & C++ 11 to process and create json files. Qt5 by default uses QString instead of std::string. Hence, while creating json, QString always has to be converted to std::string as an input to the json type of input like

QString str("teststring");
json j;
j["somevar"] = str.toStdString();

The problem is even if the str variable is not converted to stdString, the library doesn't show any semantic warning on the editor while writing the code. It is only during the compilation time, it throws an error. This makes it very hard to debug at the points where the conversion is required while writing.

Also, the compilation error only points to the file jsoncons/json_type_traits.hpp and to this block static_assert(unimplemented<T>::value, "to_json not implemented"); without specifying the lines where the conversion issue happened.

Request
Can you add a feature to throw semantic warnings on the editor when there is a data mismatch?

@danielaparker
Copy link
Owner

What operating system, compiler, and editor do you use?

@chilarai
Copy link
Author

chilarai commented Mar 21, 2021

I am using Qt Creator on Windows 10 x64 (with MSVC 2019) and Mac (with Clang). The warnings generally appear when I use other libraries/plugins like duckdb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants