Petri Lehtinen
7ee974e91c
Don't perform reference counting on true, false and null
...
This makes their constructors thread safe. A special reference count
-1 is used to test whether to perform reference counting on a value or
not.
2009-09-07 21:40:14 +03:00
Petri Lehtinen
234ee47281
Better argument validation
...
All pointer arguments are now tested for NULL. json_string() now also
tests that strdup() succeeds. This is to ensure that no NULL values
end up in data structures.
Also desribe the different sources of errors in documentation.
2009-09-06 22:24:55 +03:00
Petri Lehtinen
89d09813c3
Add reference stealing functions for inserting values to objects and arrays
...
The non-stealing functions are now just simple wrappers around these.
2009-09-04 09:52:37 +03:00
Petri Lehtinen
114fc96f76
array: Fix a few checks and a leak
2009-08-23 13:34:12 +03:00
Petri Lehtinen
2f4d6f8ae7
Add LICENSE and a copyright note to all sources
2009-07-30 11:32:24 +03:00
Petri Lehtinen
902bcdaa5e
Decode and check for correct UTF-8
...
All strings (decoded JSON text, the argument of json_string(), the key
argument of json_object_set()) are checked for valid UTF-8.
2009-07-13 23:38:01 +03:00
Petri Lehtinen
b724c2b122
Separate integers and real numbers
2009-07-04 13:19:25 +03:00
Petri Lehtinen
9b825f7b18
Move max() to util.h
2009-06-11 08:54:40 +03:00
Petri Lehtinen
0b58486ec4
Fix json_object_get
2009-05-12 22:15:48 +03:00
Petri Lehtinen
61d0111323
Bump hashtable, allocate object->hashtable statically
...
Hashtable code from git://github.com/akheron/hashtable.git commit
7331ba6acdb415a2af62ae3e93fdd39c2a83b768
2009-05-12 21:44:45 +03:00
Petri Lehtinen
a2adf6ec98
Add support for iterating over objects
2009-05-12 21:44:45 +03:00
Petri Lehtinen
17a69c2d66
Initial import
2009-05-12 21:44:01 +03:00