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
1 answer

How to setup jsoncpp library on XCode?

After downloading JSON-CPP 0.5.0 and extracting it, I've no idea how to add it to my project on XCode. I couldn't find any steps online as well. Help please.. I've also tried the steps in ReadMe file. But stuck after installing SCons.
cegprakash
  • 2,937
  • 33
  • 60
0
votes
2 answers

Neo4j and json creating multiple nodes with multiple params

I tried many things but of no use. I have already raised a question on stackoverflow earlier but I am still facing the same issue. Here is the link to old stackoverflow question creating multiple nodes with properties in json in neo4j Let me try…
Nipun
  • 4,119
  • 5
  • 47
  • 83
0
votes
1 answer

jsoncpp iteraror of members of a Value

I'm going through a json file with the following code: for (itr = root.begin(); itr != root.end(); itr++){ cout<< "Key: "<
Ros
  • 37
  • 1
  • 6
0
votes
1 answer

How to use jsoncpp in portable native client

I have included json.h in my project, but compiler says: undefined reference to 'Json::Value' or 'Json::Reader' May I need to do something else?
Alex
  • 11
  • 2
0
votes
0 answers

Is any possibility to allow jsoncpp to parse non-valid JSON with property names without quotes?

We have a huge JSON file editable by hands. We want to allow non-valid JSON (e.g. {name: "value"}) as valid input for Json::Reader::parse method.
introkun
  • 3
  • 1
0
votes
0 answers

How to get all values corresponding to a key in json having duplicate key-value members?

I am using jsoncpp to work on a JSON with duplicate key-pair values. My JSON is something like: dict = { "a" : "1", "b" : "2", "c" : "3", "a" : "4", "c" : "5" } Even though this JSON looks 'invalid', I want to get a list of…
rocx
  • 285
  • 2
  • 5
  • 13
0
votes
1 answer

Unable to build jsoncpp library in redhat with scons

I'm trying to build jsoncpp library in redhat with scons. I follow the instructions but get no result. I first install scons, then download the library source, decompress it and enter the directory. Once in the library folder I've tried several…
0
votes
1 answer

Type conversion in free functions

Using libraries like jsoncpp to serialize my C++ objects and data (e.g. to plot them in Python), I really get tired of all the loops in my code to convert std::vector< double >s into Json::Values. I end up re-typing the same lines again and again.…
wal-o-mat
  • 7,158
  • 7
  • 32
  • 41
0
votes
1 answer

Build failed for JSONCPP with Visual C++ 2010

I am building JSONCPP on Visual C++ 2010. But it is failing giving the error message: Unable to start program 'D:\json-cpp-master\makefiles\vs71../../build/vs71/debug/lib_json\lib_json.lib'. The system cannot find the file specified. Why is it…
user861938
  • 83
  • 1
  • 11
0
votes
1 answer

SIGSEGV when parsing string with JsonCpp

I have a task serialized as JSON: { text: "Some task", status: 1 } I'm using this function inside a Serialize namespace: Task parseTask(std::string task) { Json::Value root; Json::Reader reader; if(reader.parse(task, root, false))…
jviotti
  • 17,881
  • 26
  • 89
  • 148
0
votes
1 answer

Writing lines of file into JSON using C++ and jsoncpp

I have a text file that I'm trying to convert to a JSON object using jsoncpp in my c++ application. The contents of the file is formatted as so: system type : Atheros AR7241 rev 1 machine : Ubiquiti UniFi processor : 0 cpu model : MIPS 24Kc…
simonmorley
  • 2,810
  • 4
  • 30
  • 61
0
votes
1 answer

Replace a single value in JSON file with JSONcpp

Is there any way to change a single value in an already existing JSON file with JSONcpp? I want to preserve the existing formatting (comments, spaces, line breaks) in the file. Example: find the value with key "test_boolean" in C:/test.json and…
Vittorio Romeo
  • 90,666
  • 33
  • 258
  • 416
0
votes
1 answer

jsoncpp: Filling member of array from the code

I looked up the code example at jsoncpp. For member array i.e "plug-ins" in json data below { // Default encoding for text "encoding" : "UTF-8", // Plug-ins loaded at start-up "plug-ins" : [ "python", "c++", …
Vihaan Verma
  • 12,815
  • 19
  • 97
  • 126
0
votes
2 answers

Writing a large array in one line using jsoncpp's StyledWriter

I'm using jsoncpp to read and write json files. For writing, I use the StyledWriter, which writes the json in a human readable fashion. Currently, I'm trying to write an array of ints into a json file. The documentation describes the following rules…
White Zebra
  • 309
  • 1
  • 5
  • 15
0
votes
1 answer

Binary data JSONCPP

I am trying to use JSON cpp with VS2008. Can anyone tell me is it possible to pack binary data into JSON format? I am reading a image file into char* buffer, and putting it in JSON::Value. But when i try to parse it, I don't find the buffer contents…
Pavan
  • 1,023
  • 2
  • 12
  • 25