Test case
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Clarinet</title>
<script type="text/javascript">var exports = {};</script>
<script type="text/javascript" src="../clarinet.js"></script>
<script type="text/javascript">
var parser = exports.parser();
parser.onvalue = function (v) {
console.log("Value: " + v);
};
parser.onkey = function (key) {
console.log("Key: " + key);
};
parser.write('1').close();
</script>
</script>
</head>
<body>
Look at the console.
</body>
</html>
Expected outcome
parser.onvalue is called
Actual outcome
Error: Non-whitespace before {[.
Line: 1
Column: 1
Char: 49
Discussion
JSON now allows 123 as a legal value. If clarinet only supports the older version of JSON where this was not legal, then please update the documentation.
Test case
Expected outcome
parser.onvalueis calledActual outcome
Discussion
JSON now allows
123as a legal value. If clarinet only supports the older version of JSON where this was not legal, then please update the documentation.