Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Very low footprint JSON parser written in portable ANSI C

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 bindings
Octocat-spinner-32 tests
Octocat-spinner-32 AUTHORS
Octocat-spinner-32 README.md
Octocat-spinner-32 json.c
Octocat-spinner-32 json.h
README.md

Very low footprint JSON parser written in portable ANSI C.

  • BSD licensed with no dependencies (i.e. just drop the C file into your project)
  • Never recurses or allocates more memory than it needs
  • Very simple API with operator sugar for C++

API

json_value * json_parse
    (const json_char * json);

json_value * json_parse_ex
    (json_settings * settings, const json_char * json, char * error);

void json_value_free
    (json_value *);

The type field of json_value is one of:

  • json_object (see u.object.length, u.object.values[x].name, u.object.values[x].value)
  • json_array (see u.array.length, u.array.values)
  • json_integer (see u.integer)
  • json_double (see u.dbl)
  • json_string (see u.string.ptr, u.string.length)
  • json_boolean (see u.boolean)
  • json_null
Something went wrong with that request. Please try again.