Questions tagged [cjson]

cJSON aims to be the dumbest possible parser that you can get your job done with. It's a single file of C, and a single header file.

cJSON aims to be the dumbest possible parser that you can get your job done with. It's a single file of C, and a single header file.

110 questions
0
votes
1 answer

How to read a string with cJSON

I am using cJSON but somehow I can't get the strings to work: void myfile() { cJSON* type = NULL; char text1[]="{\n\"name\": \"Jack (\\\"Bee\\\") Nimble\", \n\"format\": {\"type\": \"rect\", \n\"width\": 1920, \n\"height\": 1080,…
Tom
  • 2,545
  • 5
  • 31
  • 71
0
votes
1 answer

conversion of regular string to json using cjson library

The code which was given in cJSON library converts from JSON String to JSON format. Here is the code /* Copyright (c) 2009 Dave Gamble Permission is hereby granted, free of charge, to any person obtaining a copy of this software and…
Pratik
  • 23
  • 2
  • 8
0
votes
3 answers

cJSON memory leakage

cJSON memory leak is a post where a memory leak occured. But the problem n this case is the cJSON_Print() function. I did not even use this function (have commented it for the time being) and have still a memory leakage. My ode looks like this void…
Modasser
  • 3
  • 4
0
votes
1 answer

First number in JSON parsed with CJSON is always 0

I'm trying to parse a JSON file received by a CGI file on a webserver using cJSON however the first number in the JSON keeps getting changed to 0. I've made a short piece of code which I'm using to test this: int main(int argc, char *argv[]) { …
KGB
  • 3
  • 1
-1
votes
1 answer

Tizen native service crashes occasionally when memory freed

I'm developing a tizen web app and to implement some background actions I'm using a native service along. The service executes fine for some time and after that, it crashes often when some memory allocated with malloc is freed using free. Log cat is…
Aldrin Joe Mathew
  • 472
  • 1
  • 4
  • 13
1 2 3 4 5 6 7
8