Questions tagged [jsoncpp]

jsoncpp is an open source JSON reader and writer for C++

jsoncpp is an implementation of a JSON reader and writer in C++. JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write. It is easy for machines to parse and generate.

318 questions
0
votes
2 answers

jsconcpp linker problems

I am trying to run the program detailed here. The code requires the cURL and JSON libraries, and I've been following the direction here I'm having trouble running the program - when I compile I get unresolved external symbol linker errors for both…
-1
votes
1 answer

Iterate an array from json using jsoncpp

I have the following json: { "laureates": [{ "id": "1", "firstname": "Wilhelm Conrad", "surname": "Röntgen", "born": "1845-03-27", "died": "1923-02-10", "bornCountry": "Prussia (now Germany)", …
Matias
  • 3
  • 2
-1
votes
1 answer

JSONcpp - trying to deserialize to variables

How to deserialize data values? {"data": [{ "Id": 3, "Name" : "Wind", "Type" : 2, "Order" : 1, "user" : "Mike" }], "free" : 0, "line" : 10, "count" : 1 } Here's what I've tried so…
sam
  • 9
  • 2
-1
votes
1 answer

C++ Json library building

I use https://github.com/nlohmann/json to handle in C++, I tried to build a simple code : #include "lib/json-lib/json.hpp" using json = nlohmann::json; int main() { json jsonConfiguration; while(1){ std::cout << "Hello Wolrd!"…
JustinMartinDev
  • 559
  • 2
  • 7
  • 23
-1
votes
2 answers

Using JsonCpp to return data to python with pybind11 produces Symbol not found error in python call

I am attempting to use JsonCpp in order to parse some data before returning it to python (using pybind11). I have managed to get the make file cooperating with recognizing JsonCpp and compiling, but have been unable so far to get rid of the…
Markyroson
  • 109
  • 10
-1
votes
2 answers

How do I store a JSON String inside of a JSON String?

I'm using jsoncpp to store information in JSON format. I now have the need to store a json string inside of another json string... In other words, I need to store a sub_item inside of an item. Using jsoncpp to generate the JSON string, I get…
Rick
  • 353
  • 1
  • 16
-1
votes
1 answer

Trying to parse JSON data

I'm writing C++ code using curl and JsonCpp (https://github.com/open-source-parsers/jsoncpp). Json::parseFromStream returns the following data: Funds: [ { "id" : 1, "jsonrpc" : "2.0", "result"…
Steve
  • 11
  • 4
-1
votes
3 answers

Bad values after adding them to array in JsonCpp module in C++

I have got problem after adding values to jsoncpp array. My code is next: #include #include #include #include #include "jsoncpp/dist/jsoncpp.cpp" #include "jsoncpp/dist/json/json.h" #include…
Dawid
  • 347
  • 2
  • 15
-1
votes
1 answer

Can I use jsoncpp with dynamic allocation?

I'm facing some jsoncpp issues with memory corruption. When I assign some values in local Json::Value variable, sometimes It gets a wrong data and make a crash. so I'm trying to make Json::value variable with dynamic allocation and check memory…
Linev
  • 1
  • 1
-1
votes
2 answers

Replacement for JSONCPP

The problem is that JSONCPP has a bug. It does not read JSON file properly. We store 3D models in JSON and today we got a model that crash our app. In short if we load that JSON (120KB) and save it new file we get 80KB. All vertexes are missing but…
Max
  • 6,286
  • 5
  • 44
  • 86
-2
votes
0 answers

How do I update 'include path' on VS Code to include jsoncpp files, on MacOS?

I downloaded jsoncpp library on a macport. I would like to use the json.h and value.h files, but when I type #include or #include it says "please update your includePath". I found the file where the…
solo
  • 1
  • 1
-2
votes
2 answers

Fatal error with jsoncpp while compiling for Darwin

I am facing the exact same error as this but for mac os Error message looks like this: myfile.cpp:12:10: fatal error: json/json.h: No such file or directory initially I was trying to run it like this: g++-11 myfile.cpp -o myfile -ljsoncpp then I…
ishandutta2007
  • 16,676
  • 16
  • 93
  • 129
-2
votes
2 answers

How to read JSON file which has values with parameters in C++

I'm trying to read in a JSON file using C++. In the file i have key value pairs. And in the value, I am passing number of values with different parameters. Is this approach is correct? Please suggest if there is any modifications…
sara
  • 25
  • 3
-2
votes
1 answer

Escape the symbols in JSON object

I have this JSON object {'zone1': [{'detected_people': {'coordinates': [[21, 0], [16, 4], [23, 4], [21, 6], [16, 21]]}, 'gridOrigin': [28.5, 20.6], 'gridScale': 0.5, 'gridSizeX': 50, 'gridSizeY': 50, 'stamp': '2020-08-28 21:06:48', 'zoneID':…
batuman
  • 7,066
  • 26
  • 107
  • 229
-2
votes
1 answer

c++ jsoncpp Reading json file

I m new on json, I trying to read my json file from this tutorial site https://en.wikibooks.org/wiki/JsonCpp however I get some linker error 1>------ Build started: Project: TwilightAdventure, Configuration: Debug Win32 ------ 1> Creating…
clarence ng
  • 19
  • 1
  • 7
1 2 3
21
22