… | |
… | |
1492 | if (!(dec->json.flags & F_ALLOW_TAGS)) |
1492 | if (!(dec->json.flags & F_ALLOW_TAGS)) |
1493 | ERR ("malformed JSON string, neither array, object, number, string or atom"); |
1493 | ERR ("malformed JSON string, neither array, object, number, string or atom"); |
1494 | |
1494 | |
1495 | ++dec->cur; |
1495 | ++dec->cur; |
1496 | |
1496 | |
|
|
1497 | decode_ws (dec); |
|
|
1498 | |
1497 | tag = decode_sv (dec); |
1499 | tag = decode_sv (dec); |
1498 | if (!tag) |
1500 | if (!tag) |
1499 | goto fail; |
1501 | goto fail; |
1500 | |
1502 | |
1501 | if (!SvPOK (tag)) |
1503 | if (!SvPOK (tag)) |
1502 | ERR ("malformed JSON string, (tag) must be a string"); |
1504 | ERR ("malformed JSON string, (tag) must be a string"); |
1503 | |
1505 | |
|
|
1506 | decode_ws (dec); |
|
|
1507 | |
1504 | if (*dec->cur != ')') |
1508 | if (*dec->cur != ')') |
1505 | ERR (") expected after tag"); |
1509 | ERR (") expected after tag"); |
1506 | |
1510 | |
1507 | ++dec->cur; |
1511 | ++dec->cur; |
|
|
1512 | |
|
|
1513 | decode_ws (dec); |
1508 | |
1514 | |
1509 | val = decode_sv (dec); |
1515 | val = decode_sv (dec); |
1510 | if (!val) |
1516 | if (!val) |
1511 | goto fail; |
1517 | goto fail; |
1512 | |
1518 | |