| CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Wed, 24 Dec 2025 07:19:32 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20090521155743
location: https://web.archive.org/web/20090521155743/https://lloyd.github.com/yajl
server-timing: captures_list;dur=0.501357, exclusion.robots;dur=0.036163, exclusion.robots.policy;dur=0.028015, esindex;dur=0.009752, cdx.remote;dur=14.514791, LoadShardBlock;dur=761.915245, PetaboxLoader3.datanode;dur=112.241305
x-app-server: wwwb-app224-dc8
x-ts: 302
x-tr: 803
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: wb-p-SERVER=wwwb-app224; path=/
x-location: All
x-as: 14061
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Wed, 24 Dec 2025 07:19:33 GMT
content-type: text/html
x-archive-orig-server: nginx/0.6.31
x-archive-orig-date: Thu, 21 May 2009 15:57:42 GMT
x-archive-orig-content-length: 13023
x-archive-orig-last-modified: Tue, 19 May 2009 15:37:27 GMT
x-archive-orig-connection: close
x-archive-orig-expires: Fri, 22 May 2009 15:57:42 GMT
x-archive-orig-cache-control: max-age=86400
x-archive-orig-accept-ranges: bytes
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Thu, 21 May 2009 15:57:43 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: 51_9_20090521121125_crawl100_IndexOnly-c/51_9_20090521155743_crawl101.arc.gz
server-timing: captures_list;dur=0.463488, exclusion.robots;dur=0.016122, exclusion.robots.policy;dur=0.007767, esindex;dur=0.008190, cdx.remote;dur=23.583149, LoadShardBlock;dur=201.418360, PetaboxLoader3.datanode;dur=139.222805, PetaboxLoader3.resolve;dur=126.882160, load_resource;dur=138.346266
x-app-server: wwwb-app224-dc8
x-ts: 200
x-tr: 394
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=1
x-location: All
x-as: 14061
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
content-encoding: gzip
yajl
json_reformat: a minimizer and beautifier in one.
json_verify: a JSON verifier.
Overview
Yet Another JSON Library. YAJL is a small event-driven (SAX-style) JSON parser written in ANSI C, and a small validating JSON generator. YAJL is released under the BSD license.Documentation
Documentation generated by doxygen from source is available for version 1.0.5.
Download
You can also clone the project with Git by running:
$ git clone git://github.com/lloyd/yajl
Features
Simple Interface
Largely because YAJL is event driven, the interface is very concise object oriented C. The interface is not cluttered with data representation, that bit is left up to higher level code. Indeed it should be possible to port most existing JSON libraries onto YAJL if so desired.portable
It's all ANSI C. It's been successfully compiled on debian linux, OSX 10.4 i386 & ppc, OSX 10.5 i386, winXP, FreeBSD 4.10, FreeBSD 6.1 amd64, FreeBSD 7 i386, and windows vista. More platforms and binaries as time permits.Stream parsing
YAJL remembers all state required to support restarting parsing. This allows parsing to occur incrementally as data is read off a disk or network.Fast
A second motivation for writing YAJL, was that many available free JSON parsers fall over on large or complex inputs. YAJL is careful to minimize memory copying and input re-scanning when possible. The result is a parser that should be fast enough for most applications or tunable for any application. On my mac pro (2.66 ghz) it takes 1s to verify a 60meg json file. Minimizing that same file with json_reformat takes 4s.Low resource consumption
Largely because YAJL deals with streams, it's possible to parse JSON in low memory environments. Oftentimes with other parsers an application must hold both the input text and the memory representation of the tree in memory at one time. With YAJL you can incrementally read the input stream and hold only the in memory representation. Or for filtering or validation tasks, it's not required to hold the entire input text in memory.sample programs
included in the source are a couple sample programs to demonstrate and test yajl:json_reformat: a minimizer and beautifier in one.
json_verify: a JSON verifier.
comments in JSON
If you're dead set on using JSON throughout your system, you'll probably end up using it for your configuration files too. A little crazy, perhaps. But so am I. At parser allocation time you may specify a configuration parameter to allow comments inside the JSON input text. This is supported in versions 0.2.0 and above.Example Programmatic Usage In C
License
Copyright 2007-2009, Lloyd Hilaiel.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
3. Neither the name of Lloyd Hilaiel nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
Related projects
- yajl-ruby - ruby bindings for YAJL
- yajl-objc - Objective-C bindings for YAJL
- YAJL IO bindings (for the IO language)
Contributors
Many people have helped hone yajl to a fine edge, they have my deep appreciation for taking the time to give back. Here they are in alphabetical order (if I missed anyone, please tell me. It's been a while and my memory is bad):
- Adam McLaurin
- Andrei Soroker
- Brian Lopez (brianmario on gh)
- Eric Bergstrome
- Hatem Nassrat
- Mark de Does
- Neville Franks
- Rick (technoweenie on gh)
- Robert Geiger
- Robert Varga
- Timothy J. Wood
Original Author
Lloyd Hilaiel (lloyd 4t hilaiel d0t com)
get the source code on GitHub : lloyd/yajl
(page style "borrowed" from
Kyle Cordes)