{"_id":"yajl","_rev":"9-0a17f155b1053f8dfec5c5576bce156c","name":"yajl","description":"Binding for libyajl","dist-tags":{"latest":"0.8.1"},"versions":{"0.8.0":{"name":"yajl","version":"0.8.0","description":"Binding for libyajl","author":{"name":"Artem S Vybornov","email":"vybornov@gmail.com"},"contributors":[{"name":"Lloyd Hilaiel","email":"lloyd@hilaiel.com"},{"name":"Nikhil Marathe","email":"nsm.nikhil@gmail.com"},{"name":"Andy Smith","email":"andy@zambezi.org.uk"},{"name":"Scott Nelson","email":"scottbnel@gmail.com"}],"main":"./yajl.js","scripts":{"test":"node ./test.js","install":"node-gyp rebuild"},"repository":{"type":"git","url":"git://github.com/vibornoff/node-yajl.git","web":"http://github.com/vibornoff/node-yajl"},"gypfile":true,"readme":"# YAJL (Yet Another JSON Library) binding for Node.js\n\n[YAJL](http://lloyd.github.com/yajl/) is a low-level sax-like JSON parser\ndeveloped and maintained by Lloyd Hilaiel.\n\n[Node-yajl](http://github.com/vibornoff/node-yajl) provides a glue that brings\nYAJL into [Node.js](http://github.com/joyent/node) ecosystem. Main feature\nof this project is a stream JSON parser allowing you to parse data\nwithout explicitly delimitting data stream into valid-value chunks.\n\n[Node-yajl](http://github.com/vibornoff/node-yajl) is forked from\n[yajl-js](http://bitbucket.org/nikhilm/yajl-js) originally developed\nby Nikhil Marathe and seems to be no longer maintained.\n\n## Synopsis\n\n```js\nvar yajl = require('yajl');\n\nvar h = new yajl.Handle();\nh.on( 'error',      function (_) { console.debug(_)     });\n\nh.on( 'startMap',   function ( ) { console.debug('{')   });\nh.on( 'endMap',     function ( ) { console.debug('}')   });\nh.on( 'startArray', function ( ) { console.debug('[')   });\nh.on( 'endArray',   function ( ) { console.debug(']')   });\nh.on( 'mapKey',     function (_) { console.debug(_+':') });\nh.on( 'null',       function (_) { console.debug('null')});\nh.on( 'boolean',    function (_) { console.debug(_)     });\nh.on( 'string',     function (_) { console.debug(_)     });\nh.on( 'integer',    function (_) { console.debug(_)     });\nh.on( 'double',     function (_) { console.debug(_)     });\n\nvar data = [\n    '{\"some\"',\n    ':[\"JSON',\n    '\"],\"data',\n    '\":[-3.5]}'\n];\n\nfor ( var i in data ) {\n    h.parse( data[i] );\n}\n\nh.completeParse();\n```\n\n## Build & install\n\nEasy mode:\n\n    npm install yajl\n\nBuild and install manually:\n\n    node-waf configure build\n    node ./test.js\n    npm install .\n\nNote that this package requires C++ building environment and 'libyajl' at least\nof version 2 and its dev headers to be installed on target system.\n\nSee [yajl homepage](http://lloyd.github.com/yajl/) for details about building\nand installing 'libyajl'.\n\n## API\n\n### yajl.Handle(opts)\n\n`Handle` object constructor.\nClass `Handle` itself is a subclass of `events.EventEmitter`.\n\nOptional argument `opts` can be passed to constructor.\nWhen `opts` is ommited or `null`, these defaults are used:\n\n```js\n{\n    allowComments         : false,\n    dontValidateStrings   : false,\n    allowTrailingGarbage  : false,\n    allowMultipleValues   : false,\n    allowPartialValues    : false\n}\n```\n\n#### handle.parse(string)\n\nParse a data chunk possibly raising number of events.\n\n#### handle.parseComplete()\n\nParse any ramaining buffered data.\n\nBecause of `yajl`'s stream nature it can't sometimes determine when the recently\nparsed data contains a valid JSON value or there need more data (e.g. when parsing numeric values).\nSo it's a good idea to call this method every time you reach the end of data stream.\n\n#### handle.getBytesConsumed()\n\nGet the amount of data consumed from the last chunk passed to `handle`.\n\nIn the case of a successful parse this can help you understand\nif the entire buffer was consumed or not.\n\n#### Events\n * 'startMap'\n * 'endMap'\n * 'startArray'\n * 'endArray'\n * 'mapKey'\n * 'null'\n * 'boolean'\n * 'integer'\n * 'double'\n * 'number'\n * 'string'\n\n### yajl.Tree(string)\n\n`Tree` object constructor.\n\nParses `string` into an in-memory JSON-tree.\nThrows `SyntaxError` in case when `string` contains bad data.\n\nResulting object can be retrieved using `get` method.\n\n#### tree.get()\n\nReturns parsed JSON value.\n\n## License\n\nModified BSD Lincense.\nSee ['LICENSE' file](http://github.com/vibornoff/node-yajl/blob/master/LICENSE)\nfor details.\n","_id":"yajl@0.8.0","dist":{"shasum":"d29c8edc6f5764d380a0669ef2c02356fe73ffc3","tarball":"https://registry.npmjs.org/yajl/-/yajl-0.8.0.tgz","integrity":"sha512-4YO6L8UxlbC7xqG+pYrepxdfF4e+2mPdzjIn6rVVYVrLzquTj1hpsWtevsWAvD7pKhAISvyxqPhRTSdusZD4mg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCB1lh/an0GAF3C0e27klC6BE03DBLbOtIwoLS7bYU7IQIhAPCMcrghzxqVM9yMF8m+vrOjiPqY0hLqg2gCFjhM8ZOt"}]},"_npmVersion":"1.1.59","_npmUser":{"name":"vibornoff","email":"vybornov@gmail.com"},"maintainers":[{"name":"vibornoff","email":"vybornov@gmail.com"}]},"0.8.1":{"name":"yajl","version":"0.8.1","description":"Binding for libyajl","author":{"name":"Artem S Vybornov","email":"vybornov@gmail.com"},"contributors":[{"name":"Lloyd Hilaiel","email":"lloyd@hilaiel.com"},{"name":"Nikhil Marathe","email":"nsm.nikhil@gmail.com"},{"name":"Andy Smith","email":"andy@zambezi.org.uk"},{"name":"Scott Nelson","email":"scottbnel@gmail.com"}],"main":"./yajl.js","scripts":{"test":"node ./test.js","preinstall":"node-waf clean || (exit 0); node-waf configure build"},"repository":{"type":"git","url":"git://github.com/vibornoff/node-yajl.git","web":"http://github.com/vibornoff/node-yajl"},"_npmUser":{"name":"vibornoff","email":"vybornov@gmail.com"},"_id":"yajl@0.8.1","dependencies":{},"devDependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.4","_nodeVersion":"v0.6.12","_defaultsLoaded":true,"dist":{"shasum":"bea726909e30145667b879f8d2e2041006d5510e","tarball":"https://registry.npmjs.org/yajl/-/yajl-0.8.1.tgz","integrity":"sha512-UONbxEmNh854DoNf6RNSoVdczge2bm/HZDdwZZb6f4MwnVF/HthrZEDYbXvbRho4FVtXJ5aiiPlmN1boF/kfTw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAL1dE3XmFHgohwVlQ1kfu9NXLLFBMIiT69pbmQ9ZGFJAiAJB/1xR9s6sScmml+F7u+viPWODXK7artU6pfV9hlntQ=="}]},"maintainers":[{"name":"vibornoff","email":"vybornov@gmail.com"}]}},"readme":"# YAJL (Yet Another JSON Library) binding for Node.js\n\n[YAJL](http://lloyd.github.com/yajl/) is a low-level sax-like JSON parser\ndeveloped and maintained by Lloyd Hilaiel.\n\n[Node-yajl](http://github.com/vibornoff/node-yajl) provides a glue that brings\nYAJL into [Node.js](http://github.com/joyent/node) ecosystem. Main feature\nof this project is a stream JSON parser allowing you to parse data\nwithout explicitly delimitting data stream into valid-value chunks.\n\n[Node-yajl](http://github.com/vibornoff/node-yajl) is forked from\n[yajl-js](http://bitbucket.org/nikhilm/yajl-js) originally developed\nby Nikhil Marathe and seems to be no longer maintained.\n\n## Synopsis\n\n```js\nvar yajl = require('yajl');\n\nvar h = new yajl.Handle();\nh.on( 'error',      function (_) { console.debug(_)     });\n\nh.on( 'startMap',   function ( ) { console.debug('{')   });\nh.on( 'endMap',     function ( ) { console.debug('}')   });\nh.on( 'startArray', function ( ) { console.debug('[')   });\nh.on( 'endArray',   function ( ) { console.debug(']')   });\nh.on( 'mapKey',     function (_) { console.debug(_+':') });\nh.on( 'null',       function (_) { console.debug('null')});\nh.on( 'boolean',    function (_) { console.debug(_)     });\nh.on( 'string',     function (_) { console.debug(_)     });\nh.on( 'integer',    function (_) { console.debug(_)     });\nh.on( 'double',     function (_) { console.debug(_)     });\n\nvar data = [\n    '{\"some\"',\n    ':[\"JSON',\n    '\"],\"data',\n    '\":[-3.5]}'\n];\n\nfor ( var i in data ) {\n    h.parse( data[i] );\n}\n\nh.completeParse();\n```\n\n## Build & install\n\nEasy mode:\n\n    npm install yajl\n\nBuild and install manually:\n\n    node-waf configure build\n    node ./test.js\n    npm install .\n\nNote that this package requires C++ building environment and 'libyajl' at least\nof version 2 and its dev headers to be installed on target system.\n\nSee [yajl homepage](http://lloyd.github.com/yajl/) for details about building\nand installing 'libyajl'.\n\n## API\n\n### yajl.Handle(opts)\n\n`Handle` object constructor.\nClass `Handle` itself is a subclass of `events.EventEmitter`.\n\nOptional argument `opts` can be passed to constructor.\nWhen `opts` is ommited or `null`, these defaults are used:\n\n```js\n{\n    allowComments         : false,\n    dontValidateStrings   : false,\n    allowTrailingGarbage  : false,\n    allowMultipleValues   : false,\n    allowPartialValues    : false\n}\n```\n\n#### handle.parse(string)\n\nParse a data chunk possibly raising number of events.\n\n#### handle.parseComplete()\n\nParse any ramaining buffered data.\n\nBecause of `yajl`'s stream nature it can't sometimes determine when the recently\nparsed data contains a valid JSON value or there need more data (e.g. when parsing numeric values).\nSo it's a good idea to call this method every time you reach the end of data stream.\n\n#### handle.getBytesConsumed()\n\nGet the amount of data consumed from the last chunk passed to `handle`.\n\nIn the case of a successful parse this can help you understand\nif the entire buffer was consumed or not.\n\n#### Events\n * 'startMap'\n * 'endMap'\n * 'startArray'\n * 'endArray'\n * 'mapKey'\n * 'null'\n * 'boolean'\n * 'integer'\n * 'double'\n * 'number'\n * 'string'\n\n### yajl.Tree(string)\n\n`Tree` object constructor.\n\nParses `string` into an in-memory JSON-tree.\nThrows `SyntaxError` in case when `string` contains bad data.\n\nResulting object can be retrieved using `get` method.\n\n#### tree.get()\n\nReturns parsed JSON value.\n\n## License\n\nModified BSD Lincense.\nSee ['LICENSE' file](http://github.com/vibornoff/node-yajl/blob/master/LICENSE)\nfor details.\n","maintainers":[{"name":"vibornoff","email":"vybornov@gmail.com"}],"time":{"modified":"2022-06-29T06:43:23.682Z","created":"2012-08-23T23:14:50.505Z","0.8.0":"2012-08-23T23:15:01.102Z","0.8.1":"2012-09-04T13:53:28.698Z"},"author":{"name":"Artem S Vybornov","email":"vybornov@gmail.com"},"repository":{"type":"git","url":"git://github.com/vibornoff/node-yajl.git","web":"http://github.com/vibornoff/node-yajl"},"users":{"columbennett":true,"shanewholloway":true}}