Permalink
Browse files

Initial commit

  • Loading branch information...
0 parents commit 0378f8b98e7a2c9db3ddba638a2686c21dde623d @udp committed Feb 12, 2012
Showing with 855 additions and 0 deletions.
  1. +29 −0 README.md
  2. +684 −0 json.c
  3. +142 −0 json.h
@@ -0,0 +1,29 @@
+
+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
+
+Functions:
+
+ 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`
+
+
Oops, something went wrong.

0 comments on commit 0378f8b

Please sign in to comment.