The json-c library allows your C programs to open a file containing JSON data as well as read a JSON data string, converting the information into an object for manipulation in the code. The key to accessing JSON data in your C programs is converting the raw data into a json-c object.
- [Instructor] Central to manipulating json data … with a json C library is creating a json object. … It can be extracted from json data stored … in a file, or from a string representing … json data within the source code. … In this code, a sample json document is open, … its file name specified at line seven. … At line 12, a json object is created … from the file, saved in the json object variable, jdata. … Here, only the object is created … and nothing is done with it, but I'm going to compile … and link, just to make sure that it works. … So the command is clang, that's the name of the compiler. … You can use gcc or cc. … Going to add all the switches, link in the json c library, … and type the source code name. … And the file compiles with no errors or warnings, … so run to check the output. … And there reports that the file was read … and the json object was successfully created. … In this update to the code, … the json data stored in the json object jdata … is converted into a string. …
- Finding, installing, and linking libraries
- Accessing and generating XML data
- Working with JSON
- Working with the libcurl library
- Text programming
- Reading, writing, and manipulating JPEG images
- Working with PNG images
Skill Level Advanced
1. Setup and Configuration
2. Data Structures
3. Web Access
4. Text Programming
5. Computer Graphics
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.