I am using G++ ( A linux command for compiling c++ code ) to compile a project, It spat out a error saying:
/usr/bin/ld: /usr/local/lib/libjansson.so.4: no version information available (required by /usr/bin/ld)
I first thought that the file didn't…
We were migrating Jansson 2.7 to Jansson 2.14 in Embarcadero C++Builder. After successfully added to the project, we are getting the following error, which comes from Jansson -> dump.c:
[bcc32 Error] dump.c(443): E2063 Illegal…
I have the following JSON object, from which I need to retrieve values of certain keys.
For example, in outer JSON object, I need only "timestamp" and "type", next from a nested "meta" object I need only "version", and from nested "payload" I want…
I'm using below code in my program to get the latitude and longitude.
system("curl -d @gateway_req.json -H \"Content-Type: application/json\" -i \"https://www.googleapis.com/geolocation/v1/geolocate?key=MY_API_KEY");
This returns as below,
HTTP/1.1…
I am pretty new to Linux and I am having problems integrating an external software into my program. When I am following the instructions on integrating a couple of lines that includes Jansson (Add G4Sipm to your CMakeLists.txt in this document enter…
On every even index, i need to send the constructed json over MQTT and have to clear the json once it is sent and have to construct the json again and for the same, I am using the below script,
#include
#include
#include…
Below is the part of script and the same is invoked from main function. If i comment out the below function, everything works fine without any memory leak issue, whereas by including this function, the process ends up with memory leak and eventually…
I have an application which is linked to json-c and a third party library. This third party library is linked to libjansson library. So when I execute my application, it crashes due to memory corruption as invalid pointer.
On analysis, both the…
I'm playing around with the consumer.c example file for librdkafka and I'm trying to figure out how to convert the rkm payload (that is printed out at line 244) to json so that I can grab a parameter's value from the json.
Right now I'm using…
I am trying to use the Jansson library to parse a JSON string. I am unable to parse it correctly. Here is my code in C++
std::string JSONString = "{\"Hostages\": [{\"Rescue\": \"help me!\",\"confidence\": 0.01}]}";
json_t *JsonTable, *Rescue,…
I am using jansson library, I am want to edit a Json object, how can I do this, do I have to use any specific API ??
Spare me if this question is repeated .
Thanks in advance.
In the Current code i'm using json-c. i'm migrating to jansson.
need an equivalent api in jansson which converts the json_object_to_json_string.
i found one but it needs a json string object otherwise it is returning null.
const char…
This is a stack trace of calling json_string() :
json_string(const char *value)
json_stringn(value, strlen(value))
json_stringn_nocheck(value, len)
string_create(value, len, 0)
string_create then call json_strndup(value,len) to duplicate value of…
I am using the jansson library for a C project.
I have some problem understanding how to use the decref. Shall it be used after each new json_t parameter or not? As I understand jansson will borrow references to make this simpler.
If I run this…
I am trying to test Jansson on Xcode 7.3.1. I installed according to the instructions, then used cMake when that didn't work, which also didn't work. I think Xcode is having trouble finding the Jansson library. I have modified the project header…