--- JSON-XS/XS.xs 2013/10/28 23:23:10 1.120 +++ JSON-XS/XS.xs 2013/10/29 00:06:40 1.121 @@ -1494,6 +1494,8 @@ ++dec->cur; + decode_ws (dec); + tag = decode_sv (dec); if (!tag) goto fail; @@ -1501,11 +1503,15 @@ if (!SvPOK (tag)) ERR ("malformed JSON string, (tag) must be a string"); + decode_ws (dec); + if (*dec->cur != ')') ERR (") expected after tag"); ++dec->cur; + decode_ws (dec); + val = decode_sv (dec); if (!val) goto fail;