In programming the simpler option is often the best. In fact, I think that’s true most of the times.
When I was looking for a library to read JSON data with C, cJSON seemed to be the option that allowed me to get the job done with fewer lines of code. cJSON is made with just two files of commented code. It includes some documentation and a test app. It looks simple and elegant. But the most important feature is that it is really easy to use and it encapsulates all the complexity of working with JSON. Those are the features that every software developer strive for!
This is a very simple program that illustrates how to use cJSON to read some data. It also uses some scientific notation, to give this post some scientific flavor 🙂