// Current keys
int _json_keys;
+ERASEABLE
bool _json_parse_object() {
JSON_BEGIN();
if (STRING_ITERATOR_GET(_json) != '{') JSON_FAIL("expected '{'");
JSON_END();
}
+ ERASEABLE
bool _json_parse_members() {
JSON_BEGIN();
for (;;) {
JSON_END();
}
+ ERASEABLE
bool _json_parse_pair() {
JSON_BEGIN();
if (!_json_parse_string(false)) JSON_FAIL("expected string");
JSON_END();
}
+ERASEABLE
bool _json_parse_array() {
JSON_BEGIN();
if (STRING_ITERATOR_GET(_json) != '[') JSON_FAIL("expected '['");
JSON_END();
}
+ERASEABLE
bool _json_parse_value() {
JSON_BEGIN();
if (!(_json_parse_string(true)
JSON_END();
}
+ ERASEABLE
bool _json_parse_true() {
JSON_BEGIN();
if (!(STRING_ITERATOR_GET(_json) == 't'
JSON_END();
}
+ ERASEABLE
bool _json_parse_false() {
JSON_BEGIN();
if (!(STRING_ITERATOR_GET(_json) == 'f'
JSON_END();
}
+ ERASEABLE
bool _json_parse_null() {
JSON_BEGIN();
if (!(STRING_ITERATOR_GET(_json) == 'n'
JSON_END();
}
+ERASEABLE
bool _json_parse_string(bool add) {
JSON_BEGIN();
if (STRING_ITERATOR_GET(_json) != '"') JSON_FAIL("expected opening '\"'");
JSON_END();
}
+ERASEABLE
bool _json_parse_number() {
JSON_BEGIN();
if (!(_json_parse_float() || _json_parse_int())) JSON_FAIL("expected number");
JSON_END();
}
+ ERASEABLE
bool _json_parse_float() {
JSON_BEGIN();
string s = "";
JSON_END();
}
+ ERASEABLE
bool _json_parse_int() {
JSON_BEGIN();
string s = "";
JSON_END();
}
+ERASEABLE
int json_parse(string in, bool() func) {
string trimmed = "";
LABEL(trim) {
return _json_buffer;
}
+ERASEABLE
string json_get(int buf, string key)
{
for (int i = 1, n = buf_getsize(buf); i < n; i += 2) {
return string_null;
}
+ERASEABLE
void json_del(int buf)
{
buf_del(buf);
}
+ERASEABLE
void json_dump(int buf)
{
for (int i = 0, n = buf_getsize(buf); i < n; ++i) {