How to parse JSON in C ?

This page summarizes the projects mentioned and recommended in the original post on /r/C_Programming

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • json-c

    https://github.com/json-c/json-c is the official code repository for json-c. See the wiki for release tarballs for download. API docs at http://json-c.github.io/json-c/

    There are a few libraries out there for doing it. I like json-c but there are others.

  • cJSON

    Ultralightweight JSON parser in ANSI C

    Pretty much any library you decide to use should do the trick. For a fully-featured but still simple to use library I'd recommend cJSON, or if you need something super lightweight, jsmn

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

  • JSMN

    Jsmn is a world fastest JSON parser/tokenizer. This is the official repo replacing the old one at Bitbucket

    Pretty much any library you decide to use should do the trick. For a fully-featured but still simple to use library I'd recommend cJSON, or if you need something super lightweight, jsmn

  • parson

    Lightweight JSON library written in C.

    I've always used parson for my projects: https://github.com/kgabis/parson

  • yyjson

    The fastest JSON library in C

    If you need speed, by far yyjson. But it sounds like you probably don't need speed, so the other suggestions are likely better.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts