Mandeep Jain Mandeep Jain - 1 month ago 5
JSON Question

What is jsonc ? Is jsonc and json-c different?

Recently came across this term

'jsonc'
in a youtube API, and browsed the web, but found nothing much.
Can someone explain whether

jsonc and json-c are different ?

Answer

JSON-C seems to just be a variation of JSON mainly targeted at C development. I.e., from the open source docs, "JSON-C implements a reference counting object model that allows you to easily construct JSON objects in C, output them as JSON formatted strings and parse JSON formatted strings back into the C representation of JSON objects."ref^1

From the YouTube API perspective (specifically, version 2, not the new version 3), The JSON-C response is just a condensed version of the JSON response (removing "duplicate, irrelevant or easily calculated values").ref^2

Why would the JSON response have "duplicate, irrelevant or easily calculated values" values anyway? Because it is converting the original ATOM XML format directly to JSON in a loseless conversion. You can find out more details here.

However, I would suggest using version 3 of the YouTube Data API. It is much easier to use. =)