Permalink
Browse files

[dist] 0.5.8 adds justin

  • Loading branch information...
1 parent eb1e6a0 commit f21b3ffc65d05c5b5ad33ea6deaddcec9253b003 @dscape committed Mar 26, 2012
Showing with 28 additions and 2 deletions.
  1. +5 −2 package.json
  2. +23 −0 samples/simple.html
View
@@ -2,8 +2,11 @@
, "description" :
"SAX based evented streaming JSON parser in JavaScript (browser and node)"
, "author" : "Nuno Job <nunojobpinto@gmail.com> (http://nunojob.com/)"
-, "contributors": [ "Jann Horn (https://github.com/thejh)" ]
-, "version" : "0.5.7"
+, "contributors":
+ [ "Jann Horn (https://github.com/thejh)"
+ , "Justin Makeig <jmpublic+github@makeig.com> (http://www.audiblepop.com)"
+ ]
+, "version" : "0.5.8"
, "main" : "./clarinet.js"
, "homepage" : "https://github.com/dscape/clarinet"
, "repository" :
View
@@ -0,0 +1,23 @@
+<!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('{ "firstName": "John", "lastName" : "Smith", "age" : 25, "address" : { "streetAddress": "21 2nd Street", "city" : "New York", "state" : "NY", "postalCode" : "10021" }, "phoneNumber": [ { "type" : "home", "number": "212 555-1234" }, { "type" : "fax", "number": "646 555-4567" } ] }').close();
+ </script>
+</script>
+</head>
+<body>
+ Look at the console.
+</body>
+</html>

0 comments on commit f21b3ff

Please sign in to comment.