Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
benejson JSON parsing library
C C++ JavaScript Python
branch: master

README

benejson Library
----------------

SUMMARY

Abstract:
	benejson is a buffering SAX-style JSON parsing library.
	benejson does not allocate dynamic memory.
	benejson does no eagerly convert data to a type (e.g. it is up to the user to convert a numeric type to a double or integer).

	The library package contains 3 major components:
	-PullParser: A C++ class for clean pull parsing
	-benejson.c: The parsing core written in C
	-benejson.js: A pure javascript SAX-style parser

Please see https://codehero.github.com/benejson/ for more background information.


Current release information:
	Date: January 14, 2015
	Version: 0.9.7
	Type: C++ and C are in production use, benejson.js is in early alpha


Current version dependencies:
  -Usable <stdint.h>
	-Optional <wchar.h>, <math.h>
	-C++ for pull parsing
	-scons building environment (http://www.scons.org)
	-POSIX compliant environment to build test cases
	-No external dependencies for benejson.js


BUILDING 
  -Run scons to compile. This will build the library and tests.

INSTALLING
	-There are no install scripts as I don't really want to support that.
	-Just copy libbenejson.{a,so} to your ${favorite}/lib directory and copy benejson.hh, pull.hh to a ${favorite}/benejson include directory.
	-I do have a buildroot script in the works though

RUNNING TESTS
	-This source package does not attempt to install to your system. Please check
	 the web pages for system installation packages.
  -As a development package, this doesn't really establish linking rules.
	 If you get linker errors, point LD_LIBRARY_PATH to the lib directory.
	-cdb-view.js is meant to take as stdin input a couchdb view response.
	-Run

	 node nodetest.js < config.json

	 as demonstration of the library.

NOTES

Version 0.9.5 Known Bugs/TODO:

1) benejson currently does not translate escape characters in map keys to UTF-8.
As an example, benejson would interpret {"key\n":0} as a key with 4 characters; it would NOT convert '\n' to a single char.
Obviously this is broken behaviour according the JSON spec, but I will only fix it if somebody really needs it...
2) Similarly, benejson only optimizes its key search for strings in UTF-8.
UTF-16/32 strings should be converted to UTF-8 and lexicographically sorted to use this functionality.
3) jsonoise generates a limited subset of strings (only UTF-8, no escapes)
4) jsonoise should also generate JSON with a single error
5) benejson.js is in alpha and at the moment does not strictly check syntax

Copyright (c) 2015 David Bender assigned to Benegon Enterprises LLC
See the file LICENSE for full license information.
Something went wrong with that request. Please try again.