Commit Graph

9 Commits

Author SHA1 Message Date
Petri Lehtinen
b724c2b122 Separate integers and real numbers 2009-07-04 13:19:25 +03:00
Petri Lehtinen
b1fe723a7f Fix json_loadf and json_loadfd with empty input
Nothing was appended to strbuffer, so the buffer was left empty. An
empty strbuffer is not an empty string but NULL, so the result was a
segfault.

This patch fixes the problem by initializing strbuffer to an empty
string.
2009-06-30 13:55:20 +03:00
Petri Lehtinen
dc9b954b62 Print correct error message on premature end of array 2009-06-30 13:55:20 +03:00
Petri Lehtinen
ae5ed3ff70 Fix json_set_error
Both error->line and error->text were set improperly, sigh.
2009-06-15 22:30:52 +03:00
Petri Lehtinen
7dc6cfd9cc Fix a few memory leaks in json_parse_object() 2009-06-15 13:53:53 +03:00
Petri Lehtinen
d135a80e07 Implement json_load, json_loadf and json_loadfd 2009-06-15 13:53:50 +03:00
Petri Lehtinen
fdcf28b667 Refactor error reporting 2009-05-13 22:25:34 +03:00
Petri Lehtinen
514bbeaf7f Parse an empty object correctly 2009-05-12 21:44:45 +03:00
Petri Lehtinen
17a69c2d66 Initial import 2009-05-12 21:44:01 +03:00