I am building an Azure Sphere C application, starting from the HTTPS_Curl_Easy sample project. I need json parsing, so I downloaded the Jansson library code. The project that Jansson generates when using Cmake wouldn't add as a reference to my…
Something in here is not allowing '\n' to be interpreted as a newline control character. Can someone help?
The output, when printed, seems to print
"I want this statement\nto be in newlines,\nbecause I want it\n that way.",
AND NOT
"I want this…
I was using the Jansson C library to parse some JSON file and using the method used in the sample file I tried to parse it using C-like code:
FILE *f = fopen(json_path.c_str(), "r");
fseek(f, 0L, SEEK_END);
long size = ftell(f);
fseek(f, 0L,…
I am new to C++ and cannot figure out how to strip some miscellaneous data from a string and then parse it as JSON.
I've ended up using the most documented JSON parser I could find - jansson. It seems excellent, although I'm stuck at the first…
I'm trying to send a json payload using librdkafka c api. What I'm trying to do now is
#include
#include
#include
#include
#include
#include
typedef struct my_data {
…
I am using the Jansson library in my c++ code. In the library when any Jansson variable is created, the variable should be freed to release the reference and I am using the 'json_decref(json_t *json)' method to release.
But sometimes it causes the…
So I'm trying to format text in a desired fashion using the received JSON string in server side. My code is using jansson library to parse JSON.
Here is the input JSON string (will be received from client):
{"system": {"hmiSettings": {"wifi":…
I have application that uses jansson library. I want to change our architecture to ARM board. I was searching for how to compile / or source for ARM jansson library, but without any succeed.
Does someone has any idea how to tailor the existing…
If a double value of 8.13 is passed into json_real and dump the json i see that its printing 8.1300000000000008, Is there any way to get 8.13 or 8.13000000000000000 exactly in C?
double test = 8.13;
json_t* msgtest = json_object();
…
I have a for loop and while iterating the loop, if the index is even index the json object has to be freed and again a new object has to be constructed and again the process has to be repeated.
For the same, using the below script,
#include…
I have a json file. And, the file is successfully loaded.
but, i would like to change the value such as below
and save the json file with the modification.
But, the value is not changed and saved at all.
How could i do?
from…
i am using janson library to send json body as rest request's , i have notice that i am doing it in this way :
json_t *json_body = json_object();
char sentString[100];
char sentStringSecond[100];
..
json_object_set_new(json_body, "sentString",…
I have the following CMakeLists.txt
cmake_minimum_required(VERSION 3.16)
project(LSODrinkServer VERSION 0.1 LANGUAGES C)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
list(APPEND CMAKE_MODULE_PATH…
I have been struggling to understand the proper use of json_decref and json_incref in combination with the json_get functions to isolate and manipulate a small piece of a larger json file without keeping the whole thing in memory. This question is…