Commit Graph

8 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
8c697312e4 strbuffer_value: Return a read-only pointer rather than duplicating the value 2009-06-13 22:27:23 +03:00
Petri Lehtinen
197d3aa160 Implement strbuffer
String buffer (strbuffer) is an object that resizes automatically when
data is added to it. It was implemented by generalizing the technique
used in json_dumps().
2009-06-11 08:56:11 +03:00
Petri Lehtinen
7764f3f321 Implement json_dump and json_dumps 2009-06-09 22:37:31 +03:00
Petri Lehtinen
d1407bed3a Implement dumping to an fd 2009-05-16 15:15:01 +03:00
Petri Lehtinen
9ea51b2855 Implement dumping to file 2009-05-12 21:44:45 +03:00
Petri Lehtinen
17a69c2d66 Initial import 2009-05-12 21:44:01 +03:00