-
Notifications
You must be signed in to change notification settings - Fork 4
/
README
68 lines (50 loc) · 2.54 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
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.