Questions tagged [json-c]

JSON-C is a C library for parsing and generating JSON. It includes a reference counted model for JSON objects.

For more information: JSON-C - A JSON implementation in C

86 questions
1
vote
2 answers

Looping code using PHP

I am currently using YouTube's API JSON-C response to pull data from a playlist and display the content in a list. I am doing this using PHP, however because YouTube restricts the maximum number of videos called, I have a hit a stumbling block. The…
age2011
  • 37
  • 3
1
vote
0 answers

Multidimensional JSON-C file convert to WEKA ARFF

Notice: I'm going to use direct string manipulation to get my data instead of JSON. I STILL WANT TO KNOW how to do this. I have very large datasets I'm currently trying to categorize, but the first step is getting my data into a format that I can…
Haskell McRavin
  • 620
  • 5
  • 19
1
vote
1 answer

Parse json file using json-c

I am using the json-c library. I am encountering two issues when trying to parse a json file in C. If I try and parse the file as it is I get a segmentation fault at json_object_object_foreach(). But if I remove the square bracket at the beginning…
homeGrown
  • 375
  • 1
  • 8
  • 25
1
vote
1 answer

json-c: Simplest way to access a value from a subarray

{ "name":"John Doe", "dob":"2005-01-03", "scores": { "math": { "lowest":65, "highest":98 }, "english": { "lowest":75, "highest":80 }, …
Phil
  • 2,008
  • 1
  • 17
  • 23
1
vote
0 answers

json_object_put is not working on loop

i worked with json-c library in C language. I have the following code #include #include #include #include #include int main() { while(1) { testJson(); Sleep(2000);…
Abdul Manaf
  • 4,933
  • 8
  • 51
  • 95
1
vote
2 answers

segmentation fault reading json string

I am trying to read json string and print, it is producing segmentation fault(core dumped). I think the error is beacuse of the input string but not really sure. here is the code CODE: #include #include void…
sandesh
  • 390
  • 6
  • 20
1
vote
2 answers

warning: missing terminating " character [enabled by default]

I am getting this weird error below json.c:81:19: warning: missing terminating " character [enabled by default] json.c:81:3: error: missing terminating " character json.c:82:32: error: expected ‘,’ or ‘;’ before ‘:’ token json.c:90:22: warning:…
Naroju
  • 2,637
  • 4
  • 25
  • 44
1
vote
1 answer

Parsing JSON array in C

I have the following JSON returned from the server, and I'm trying to access to the Values (timestamp/data): { "queries": [ { "sample_size": 1, "results": [ { "name": "data", "group_by": [ …
Rekovni
  • 6,319
  • 3
  • 39
  • 62
1
vote
3 answers

Undefined reference error while using json-c

I want to use json-c in my program. While compiling (linking) I'm getting errors: parsejson.c:(.text.startup+0xf): undefined reference to `json_object_new_object' parsejson.c:(.text.startup+0x1c): undefined reference to…
Sparsh Pipley
  • 451
  • 8
  • 22
1
vote
2 answers

json-c parsing - error dereferencing pointer to incomplete type

I've been trying to use the following code, taken from an example, I've had to change json_object_object_get(struct json_object *obj, const char *key) to json_object_get_ex(struct json_object *obj, const char *key, struct json_object **value) I'm…
jewfro
  • 253
  • 1
  • 5
  • 15
1
vote
1 answer

How to read JSON-c data from Youtube API using GSON in Android Apps

First, im a beginner in JSON and GSON, so please bear with me. I want to read the data that i retrieved from this link : https://gdata.youtube.com/feeds/api/videos?author=radityadika&v=2&alt=jsonc So i tried to create some classes that represent…
Blaze Tama
  • 10,828
  • 13
  • 69
  • 129
1
vote
2 answers

Include json-c in C project

I have a libnfc project that I compile with make-install and run my file with ./xxx Now I want to use json-c in xxx.c but a simple "#include " does not work. How can I access the json-c methods from xxx.c? Thanks for your…
user1416721
  • 21
  • 2
  • 4
1
vote
2 answers

how do I build postgis2.1, make check failing

I downloaded postgis-2.1.0SVN, autogen, configured and make, but 'make check' fails and the logs end with psql:/home/admin/postgis-2.1.0SVN/regress/00-regress-install/share/contrib/postgis/postgis.sql:47: ERROR: could not load library …
johnlockwood
  • 247
  • 2
  • 7
1
vote
1 answer

can't create playlists after creating a channel

Name of API affected: YouTube Data API 2.1 Issue summary: I am running into issues with youtube accounts that are unlinked. First I successfully create a channel for an account through the youtube gdata api. Then when I try to create a playlist for…
1
vote
1 answer

adding multiple playlist entries is unreliable

I'm seeing issues where adding multiple entries to a playlist in a short amount of time seems to fail regularly without any error responses. I'm using the json-c format with version 2.1 of the api. If I send POST requests to add 7 videos entries to…