src/json.c

changeset 942
8a5bbdb7f87f
parent 941
9077724b75a0
child 943
9f1eb30dbc84
equal deleted inserted replaced
941:9077724b75a0 942:8a5bbdb7f87f
508 } 508 }
509 } else if (state == JP_STATE_OBJ_COLON) { 509 } else if (state == JP_STATE_OBJ_COLON) {
510 // expect ':' 510 // expect ':'
511 if (token.tokentype != CX_JSON_TOKEN_NAME_SEPARATOR) return -1; 511 if (token.tokentype != CX_JSON_TOKEN_NAME_SEPARATOR) return -1;
512 // next state 512 // next state
513 p->states[p->nstates] = 1; 513 p->states[p->nstates] = JP_STATE_VALUE_BEGIN_OBJ;
514 ret = json_read(p); 514 ret = json_read(p);
515 } else if (state == 7) { 515 } else if (state == JP_STATE_OBJ_SEP_OR_CLOSE) {
516 // expect ',' or '}' 516 // expect ',' or '}'
517 if (token.tokentype == CX_JSON_TOKEN_VALUE_SEPARATOR) { 517 if (token.tokentype == CX_JSON_TOKEN_VALUE_SEPARATOR) {
518 p->states[p->nstates] = JP_STATE_OBJ_NAME; 518 p->states[p->nstates] = JP_STATE_OBJ_NAME;
519 ret = json_read(p); 519 ret = json_read(p);
520 } else if (token.tokentype == CX_JSON_TOKEN_END_OBJECT) { 520 } else if (token.tokentype == CX_JSON_TOKEN_END_OBJECT) {

mercurial