ffi-yajl 0.0.3-universal-java → 0.0.4-universal-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/ffi_yajl/ext/encoder/encoder.c +1 -1
- data/ext/libyajl2/vendored/.gitignore +3 -0
- data/ext/libyajl2/vendored/BUILDING +23 -0
- data/ext/libyajl2/vendored/BUILDING.win32 +27 -0
- data/ext/libyajl2/vendored/CMakeLists.txt +79 -0
- data/ext/libyajl2/vendored/COPYING +13 -0
- data/ext/libyajl2/vendored/ChangeLog +175 -0
- data/ext/libyajl2/vendored/README +74 -0
- data/ext/libyajl2/vendored/TODO +9 -0
- data/ext/libyajl2/vendored/YAJLDoc.cmake +26 -0
- data/ext/libyajl2/vendored/configure +79 -0
- data/ext/libyajl2/vendored/example/CMakeLists.txt +23 -0
- data/ext/libyajl2/vendored/example/README.md +7 -0
- data/ext/libyajl2/vendored/example/parse_config.c +69 -0
- data/ext/libyajl2/vendored/example/sample.config +101 -0
- data/ext/libyajl2/vendored/perf/CMakeLists.txt +23 -0
- data/ext/libyajl2/vendored/perf/documents.c +1418 -0
- data/ext/libyajl2/vendored/perf/documents.h +28 -0
- data/ext/libyajl2/vendored/perf/perftest.c +134 -0
- data/ext/libyajl2/vendored/reformatter/CMakeLists.txt +39 -0
- data/ext/libyajl2/vendored/reformatter/json_reformat.c +194 -0
- data/ext/libyajl2/vendored/src/CMakeLists.txt +86 -0
- data/ext/libyajl2/vendored/src/YAJL.dxy +1258 -0
- data/ext/libyajl2/vendored/src/api/yajl_common.h +75 -0
- data/ext/libyajl2/vendored/src/api/yajl_gen.h +157 -0
- data/ext/libyajl2/vendored/src/api/yajl_parse.h +226 -0
- data/ext/libyajl2/vendored/src/api/yajl_tree.h +185 -0
- data/ext/libyajl2/vendored/src/api/yajl_version.h.cmake +23 -0
- data/ext/libyajl2/vendored/src/yajl +33 -0
- data/ext/libyajl2/vendored/src/yajl.c +175 -0
- data/ext/libyajl2/vendored/src/yajl.pc.cmake +9 -0
- data/ext/libyajl2/vendored/src/yajl_alloc.c +52 -0
- data/ext/libyajl2/vendored/src/yajl_alloc.h +34 -0
- data/ext/libyajl2/vendored/src/yajl_buf.c +103 -0
- data/ext/libyajl2/vendored/src/yajl_buf.h +57 -0
- data/ext/libyajl2/vendored/src/yajl_bytestack.h +69 -0
- data/ext/libyajl2/vendored/src/yajl_encode.c +220 -0
- data/ext/libyajl2/vendored/src/yajl_encode.h +34 -0
- data/ext/libyajl2/vendored/src/yajl_gen.c +354 -0
- data/ext/libyajl2/vendored/src/yajl_lex.c +763 -0
- data/ext/libyajl2/vendored/src/yajl_lex.h +117 -0
- data/ext/libyajl2/vendored/src/yajl_parser.c +498 -0
- data/ext/libyajl2/vendored/src/yajl_parser.h +78 -0
- data/ext/libyajl2/vendored/src/yajl_tree.c +503 -0
- data/ext/libyajl2/vendored/src/yajl_version.c +7 -0
- data/ext/libyajl2/vendored/test/CMakeLists.txt +23 -0
- data/ext/libyajl2/vendored/test/cases/ac_difficult_json_c_test_case_with_comments.json +1 -0
- data/ext/libyajl2/vendored/test/cases/ac_difficult_json_c_test_case_with_comments.json.gold +36 -0
- data/ext/libyajl2/vendored/test/cases/ac_simple_with_comments.json +11 -0
- data/ext/libyajl2/vendored/test/cases/ac_simple_with_comments.json.gold +9 -0
- data/ext/libyajl2/vendored/test/cases/ag_false_then_garbage.json +1 -0
- data/ext/libyajl2/vendored/test/cases/ag_false_then_garbage.json.gold +2 -0
- data/ext/libyajl2/vendored/test/cases/ag_null_then_garbage.json +1 -0
- data/ext/libyajl2/vendored/test/cases/ag_null_then_garbage.json.gold +2 -0
- data/ext/libyajl2/vendored/test/cases/ag_true_then_garbage.json +1 -0
- data/ext/libyajl2/vendored/test/cases/ag_true_then_garbage.json.gold +2 -0
- data/ext/libyajl2/vendored/test/cases/am_eof.json +1 -0
- data/ext/libyajl2/vendored/test/cases/am_eof.json.gold +4 -0
- data/ext/libyajl2/vendored/test/cases/am_integers.json +1 -0
- data/ext/libyajl2/vendored/test/cases/am_integers.json.gold +3 -0
- data/ext/libyajl2/vendored/test/cases/am_multiple.json +3 -0
- data/ext/libyajl2/vendored/test/cases/am_multiple.json.gold +5 -0
- data/ext/libyajl2/vendored/test/cases/am_stuff.json +7 -0
- data/ext/libyajl2/vendored/test/cases/am_stuff.json.gold +14 -0
- data/ext/libyajl2/vendored/test/cases/ap_array_open.json +1 -0
- data/ext/libyajl2/vendored/test/cases/ap_array_open.json.gold +2 -0
- data/ext/libyajl2/vendored/test/cases/ap_eof_str.json +1 -0
- data/ext/libyajl2/vendored/test/cases/ap_eof_str.json.gold +1 -0
- data/ext/libyajl2/vendored/test/cases/ap_map_open.json +1 -0
- data/ext/libyajl2/vendored/test/cases/ap_map_open.json.gold +2 -0
- data/ext/libyajl2/vendored/test/cases/ap_partial_ok.json +1 -0
- data/ext/libyajl2/vendored/test/cases/ap_partial_ok.json.gold +4 -0
- data/ext/libyajl2/vendored/test/cases/array.json +6 -0
- data/ext/libyajl2/vendored/test/cases/array.json.gold +22 -0
- data/ext/libyajl2/vendored/test/cases/array_close.json +1 -0
- data/ext/libyajl2/vendored/test/cases/array_close.json.gold +2 -0
- data/ext/libyajl2/vendored/test/cases/bignums.json +1 -0
- data/ext/libyajl2/vendored/test/cases/bignums.json.gold +5 -0
- data/ext/libyajl2/vendored/test/cases/bogus_char.json +4 -0
- data/ext/libyajl2/vendored/test/cases/bogus_char.json.gold +10 -0
- data/ext/libyajl2/vendored/test/cases/codepoints_from_unicode_org.json +1 -0
- data/ext/libyajl2/vendored/test/cases/codepoints_from_unicode_org.json.gold +2 -0
- data/ext/libyajl2/vendored/test/cases/deep_arrays.json +1 -0
- data/ext/libyajl2/vendored/test/cases/deep_arrays.json.gold +2049 -0
- data/ext/libyajl2/vendored/test/cases/difficult_json_c_test_case.json +1 -0
- data/ext/libyajl2/vendored/test/cases/difficult_json_c_test_case.json.gold +36 -0
- data/ext/libyajl2/vendored/test/cases/doubles.json +1 -0
- data/ext/libyajl2/vendored/test/cases/doubles.json.gold +7 -0
- data/ext/libyajl2/vendored/test/cases/doubles_in_array.json +1 -0
- data/ext/libyajl2/vendored/test/cases/doubles_in_array.json.gold +8 -0
- data/ext/libyajl2/vendored/test/cases/empty_array.json +1 -0
- data/ext/libyajl2/vendored/test/cases/empty_array.json.gold +3 -0
- data/ext/libyajl2/vendored/test/cases/empty_string.json +1 -0
- data/ext/libyajl2/vendored/test/cases/empty_string.json.gold +2 -0
- data/ext/libyajl2/vendored/test/cases/escaped_bulgarian.json +4 -0
- data/ext/libyajl2/vendored/test/cases/escaped_bulgarian.json.gold +7 -0
- data/ext/libyajl2/vendored/test/cases/escaped_foobar.json +1 -0
- data/ext/libyajl2/vendored/test/cases/escaped_foobar.json.gold +2 -0
- data/ext/libyajl2/vendored/test/cases/false.json +1 -0
- data/ext/libyajl2/vendored/test/cases/false.json.gold +2 -0
- data/ext/libyajl2/vendored/test/cases/fg_false_then_garbage.json +1 -0
- data/ext/libyajl2/vendored/test/cases/fg_false_then_garbage.json.gold +3 -0
- data/ext/libyajl2/vendored/test/cases/fg_issue_7.json +1 -0
- data/ext/libyajl2/vendored/test/cases/fg_issue_7.json.gold +3 -0
- data/ext/libyajl2/vendored/test/cases/fg_null_then_garbage.json +1 -0
- data/ext/libyajl2/vendored/test/cases/fg_null_then_garbage.json.gold +3 -0
- data/ext/libyajl2/vendored/test/cases/fg_true_then_garbage.json +1 -0
- data/ext/libyajl2/vendored/test/cases/fg_true_then_garbage.json.gold +3 -0
- data/ext/libyajl2/vendored/test/cases/four_byte_utf8.json +2 -0
- data/ext/libyajl2/vendored/test/cases/four_byte_utf8.json.gold +5 -0
- data/ext/libyajl2/vendored/test/cases/high_overflow.json +1 -0
- data/ext/libyajl2/vendored/test/cases/high_overflow.json.gold +2 -0
- data/ext/libyajl2/vendored/test/cases/integers.json +3 -0
- data/ext/libyajl2/vendored/test/cases/integers.json.gold +14 -0
- data/ext/libyajl2/vendored/test/cases/invalid_utf8.json +1 -0
- data/ext/libyajl2/vendored/test/cases/invalid_utf8.json.gold +3 -0
- data/ext/libyajl2/vendored/test/cases/isolated_surrogate_marker.json +1 -0
- data/ext/libyajl2/vendored/test/cases/isolated_surrogate_marker.json.gold +2 -0
- data/ext/libyajl2/vendored/test/cases/leading_zero_in_number.json +1 -0
- data/ext/libyajl2/vendored/test/cases/leading_zero_in_number.json.gold +5 -0
- data/ext/libyajl2/vendored/test/cases/lonely_minus_sign.json +7 -0
- data/ext/libyajl2/vendored/test/cases/lonely_minus_sign.json.gold +9 -0
- data/ext/libyajl2/vendored/test/cases/lonely_number.json +1 -0
- data/ext/libyajl2/vendored/test/cases/lonely_number.json.gold +2 -0
- data/ext/libyajl2/vendored/test/cases/low_overflow.json +1 -0
- data/ext/libyajl2/vendored/test/cases/low_overflow.json.gold +2 -0
- data/ext/libyajl2/vendored/test/cases/map_close.json +1 -0
- data/ext/libyajl2/vendored/test/cases/map_close.json.gold +2 -0
- data/ext/libyajl2/vendored/test/cases/missing_integer_after_decimal_point.json +1 -0
- data/ext/libyajl2/vendored/test/cases/missing_integer_after_decimal_point.json.gold +2 -0
- data/ext/libyajl2/vendored/test/cases/missing_integer_after_exponent.json +1 -0
- data/ext/libyajl2/vendored/test/cases/missing_integer_after_exponent.json.gold +2 -0
- data/ext/libyajl2/vendored/test/cases/multiple.json +3 -0
- data/ext/libyajl2/vendored/test/cases/multiple.json.gold +4 -0
- data/ext/libyajl2/vendored/test/cases/non_utf8_char_in_string.json +1 -0
- data/ext/libyajl2/vendored/test/cases/non_utf8_char_in_string.json.gold +8 -0
- data/ext/libyajl2/vendored/test/cases/np_partial_bad.json +1 -0
- data/ext/libyajl2/vendored/test/cases/np_partial_bad.json.gold +5 -0
- data/ext/libyajl2/vendored/test/cases/null.json +1 -0
- data/ext/libyajl2/vendored/test/cases/null.json.gold +2 -0
- data/ext/libyajl2/vendored/test/cases/nulls_and_bools.json +5 -0
- data/ext/libyajl2/vendored/test/cases/nulls_and_bools.json.gold +9 -0
- data/ext/libyajl2/vendored/test/cases/simple.json +5 -0
- data/ext/libyajl2/vendored/test/cases/simple.json.gold +9 -0
- data/ext/libyajl2/vendored/test/cases/simple_with_comments.json +11 -0
- data/ext/libyajl2/vendored/test/cases/simple_with_comments.json.gold +5 -0
- data/ext/libyajl2/vendored/test/cases/string_invalid_escape.json +1 -0
- data/ext/libyajl2/vendored/test/cases/string_invalid_escape.json.gold +3 -0
- data/ext/libyajl2/vendored/test/cases/string_invalid_hex_char.json +1 -0
- data/ext/libyajl2/vendored/test/cases/string_invalid_hex_char.json.gold +2 -0
- data/ext/libyajl2/vendored/test/cases/string_with_escapes.json +3 -0
- data/ext/libyajl2/vendored/test/cases/string_with_escapes.json.gold +7 -0
- data/ext/libyajl2/vendored/test/cases/string_with_invalid_newline.json +2 -0
- data/ext/libyajl2/vendored/test/cases/string_with_invalid_newline.json.gold +2 -0
- data/ext/libyajl2/vendored/test/cases/three_byte_utf8.json +1 -0
- data/ext/libyajl2/vendored/test/cases/three_byte_utf8.json.gold +7 -0
- data/ext/libyajl2/vendored/test/cases/true.json +1 -0
- data/ext/libyajl2/vendored/test/cases/true.json.gold +2 -0
- data/ext/libyajl2/vendored/test/cases/unescaped_bulgarian.json +1 -0
- data/ext/libyajl2/vendored/test/cases/unescaped_bulgarian.json.gold +4 -0
- data/ext/libyajl2/vendored/test/cases/zerobyte.json +1 -0
- data/ext/libyajl2/vendored/test/cases/zerobyte.json.gold +0 -0
- data/ext/libyajl2/vendored/test/run_tests.sh +94 -0
- data/ext/libyajl2/vendored/test/yajl_test.c +281 -0
- data/ext/libyajl2/vendored/verify/CMakeLists.txt +39 -0
- data/ext/libyajl2/vendored/verify/json_verify.c +116 -0
- data/lib/ffi_yajl/version.rb +1 -1
- data/lib/libyajl.so +0 -0
- data/lib/libyajl.so.2 +0 -0
- data/lib/libyajl.so.2.0.5 +0 -0
- data/lib/libyajl_s.a +0 -0
- data/spec/ffi_yajl/encoder_spec.rb +6 -0
- metadata +171 -10
- data/ext/ffi_yajl/ext/encoder/encoder.bundle +0 -0
- data/ext/ffi_yajl/ext/encoder/encoder.o +0 -0
- data/ext/ffi_yajl/ext/parser/parser.bundle +0 -0
- data/ext/ffi_yajl/ext/parser/parser.o +0 -0
- data/ext/libyajl2/mkmf.log +0 -63
- data/lib/libyajl.2.0.1.dylib +0 -0
- data/lib/libyajl.2.dylib +0 -0
- data/lib/libyajl.dylib +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67e75912c79cafa9bed3a60c659d21266331fd17
|
4
|
+
data.tar.gz: 1fb80de6152c07fb97e1b93f6f794b23b9d6c944
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 68f96d3cf4f6e3b56b07bf8ed718b82450e415063ee186f1bd06dffd7efb4f7dcc273ee3028c0c84395610d40e884c6e2f805e23c74195171d490a7caa3cb06c
|
7
|
+
data.tar.gz: 494151a58c48d8eafd3cadecf77a9dfeaed70cf7fe651599a313b6418df151cb7ebaafab6209eb64504d3a9dc0e32ba29e5930e4f90581d0765e24f470e5cf03
|
@@ -0,0 +1,23 @@
|
|
1
|
+
Short story (If you already have ruby and cmake):
|
2
|
+
|
3
|
+
./configure && make install
|
4
|
+
|
5
|
+
When things go wrong:
|
6
|
+
|
7
|
+
attain CMake (http://www.cmake.org) and ruby (http://ruby-lang.org) and
|
8
|
+
try again.
|
9
|
+
|
10
|
+
OR, attain CMake and build by hand:
|
11
|
+
|
12
|
+
1. mkdir build
|
13
|
+
2. cd build
|
14
|
+
3. cmake ..
|
15
|
+
4. make
|
16
|
+
5. build output left in yajl-X.Y.Z
|
17
|
+
|
18
|
+
NOTE: for 64-bit systems where lib64 is used you can pass the cmake
|
19
|
+
variable LIB_SUFFIX to cause installation into the system's 'lib64'
|
20
|
+
directory.
|
21
|
+
|
22
|
+
best,
|
23
|
+
lloyd
|
@@ -0,0 +1,27 @@
|
|
1
|
+
YAJL has been successfully built using Visual Studio 8. CMake, a
|
2
|
+
build file generator, is used to build the software. CMake supports
|
3
|
+
several different build environments, so you may either build YAJL
|
4
|
+
using the IDE via the following steps:
|
5
|
+
|
6
|
+
1. acquire cmake (http://www.cmake.org)
|
7
|
+
2. mkdir build
|
8
|
+
3. cd build
|
9
|
+
4. cmake ..
|
10
|
+
5. devenv YetAnotherJSONParser.sln /project ALL_BUILD /build Release
|
11
|
+
6. build output is left in build/yajl-X.Y.Z
|
12
|
+
|
13
|
+
Or you can build from the command line using nmake:
|
14
|
+
|
15
|
+
1. Click Start > Programs > Microsoft Visual Studio > Visual Studio
|
16
|
+
Tools > Visual Studio Command Prompt -- for your version of Visual
|
17
|
+
Studio, which will open a command prompt. You may verify that the
|
18
|
+
compiler is in your path by typing "cl /?" at the prompt.
|
19
|
+
2. cd C:\path\to\yajl\source\
|
20
|
+
3. mkdir build
|
21
|
+
4. cd build
|
22
|
+
5. cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=Release ..
|
23
|
+
6. nmake
|
24
|
+
7. nmake install
|
25
|
+
|
26
|
+
Earlier versions of visual studio and other build generators haven't
|
27
|
+
been thoroughly tested, but should work without any major issues.
|
@@ -0,0 +1,79 @@
|
|
1
|
+
# Copyright (c) 2007-2011, Lloyd Hilaiel <lloyd@hilaiel.com>
|
2
|
+
#
|
3
|
+
# Permission to use, copy, modify, and/or distribute this software for any
|
4
|
+
# purpose with or without fee is hereby granted, provided that the above
|
5
|
+
# copyright notice and this permission notice appear in all copies.
|
6
|
+
#
|
7
|
+
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
8
|
+
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
9
|
+
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
10
|
+
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
11
|
+
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
12
|
+
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
13
|
+
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
14
|
+
|
15
|
+
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
|
16
|
+
|
17
|
+
PROJECT(YetAnotherJSONParser C)
|
18
|
+
|
19
|
+
SET (YAJL_MAJOR 2)
|
20
|
+
SET (YAJL_MINOR 0)
|
21
|
+
SET (YAJL_MICRO 5)
|
22
|
+
|
23
|
+
SET (YAJL_DIST_NAME "yajl-${YAJL_MAJOR}.${YAJL_MINOR}.${YAJL_MICRO}")
|
24
|
+
|
25
|
+
IF (NOT CMAKE_BUILD_TYPE)
|
26
|
+
SET(CMAKE_BUILD_TYPE "Release")
|
27
|
+
ENDIF (NOT CMAKE_BUILD_TYPE)
|
28
|
+
|
29
|
+
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
|
30
|
+
|
31
|
+
IF (WIN32)
|
32
|
+
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4")
|
33
|
+
ADD_DEFINITIONS(-DWIN32)
|
34
|
+
SET(linkFlags "/PDB:NONE /INCREMENTAL:NO /OPT:NOREF /OPT:NOICF")
|
35
|
+
SET(CMAKE_EXE_LINKER_FLAGS "${linkFlags}"
|
36
|
+
CACHE STRING "YAJL linker flags" FORCE)
|
37
|
+
SET(CMAKE_EXE_LINKER_FLAGS_DEBUG ""
|
38
|
+
CACHE STRING "YAJL debug linker flags" FORCE)
|
39
|
+
SET(CMAKE_EXE_LINKER_FLAGS_RELEASE
|
40
|
+
CACHE STRING "YAJL release linker flags" FORCE)
|
41
|
+
SET(CMAKE_SHARED_LINKER_FLAGS "${linkFlags}"
|
42
|
+
CACHE STRING "YAJL shared linker flags" FORCE)
|
43
|
+
SET(CMAKE_MODULE_LINKER_FLAGS "${linkFlags}"
|
44
|
+
CACHE STRING "YAJL module linker flags" FORCE)
|
45
|
+
|
46
|
+
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4996 /wd4255 /wd4130 /wd4100 /wd4711")
|
47
|
+
SET(CMAKE_C_FLAGS_DEBUG "/D DEBUG /Od /Z7")
|
48
|
+
SET(CMAKE_C_FLAGS_RELEASE "/D NDEBUG /O2")
|
49
|
+
ELSE (WIN32)
|
50
|
+
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
|
51
|
+
IF(CMAKE_COMPILER_IS_GNUCC)
|
52
|
+
INCLUDE(CheckCCompilerFlag)
|
53
|
+
CHECK_C_COMPILER_FLAG(-fvisibility=hidden HAVE_GCC_VISIBILITY)
|
54
|
+
IF(HAVE_GCC_VISIBILITY)
|
55
|
+
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden")
|
56
|
+
ENDIF(HAVE_GCC_VISIBILITY)
|
57
|
+
ENDIF(CMAKE_COMPILER_IS_GNUCC)
|
58
|
+
SET(CMAKE_C_FLAGS
|
59
|
+
"${CMAKE_C_FLAGS} -std=c99 -pedantic -Wpointer-arith -Wno-format-y2k -Wstrict-prototypes -Wmissing-declarations -Wnested-externs -Wextra -Wundef -Wwrite-strings -Wold-style-definition -Wredundant-decls -Wno-unused-parameter -Wno-sign-compare -Wmissing-prototypes")
|
60
|
+
|
61
|
+
SET(CMAKE_C_FLAGS_DEBUG "-DDEBUG -g")
|
62
|
+
SET(CMAKE_C_FLAGS_RELEASE "-DNDEBUG -O2 -Wuninitialized")
|
63
|
+
ENDIF (WIN32)
|
64
|
+
|
65
|
+
|
66
|
+
ADD_SUBDIRECTORY(src)
|
67
|
+
ADD_SUBDIRECTORY(test)
|
68
|
+
ADD_SUBDIRECTORY(reformatter)
|
69
|
+
ADD_SUBDIRECTORY(verify)
|
70
|
+
ADD_SUBDIRECTORY(example)
|
71
|
+
ADD_SUBDIRECTORY(perf)
|
72
|
+
|
73
|
+
INCLUDE(YAJLDoc.cmake)
|
74
|
+
|
75
|
+
# a test target
|
76
|
+
ADD_CUSTOM_TARGET(test
|
77
|
+
./run_tests.sh ${CMAKE_CURRENT_BINARY_DIR}/test/yajl_test
|
78
|
+
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test)
|
79
|
+
|
@@ -0,0 +1,13 @@
|
|
1
|
+
Copyright (c) 2007-2011, Lloyd Hilaiel <lloyd@hilaiel.com>
|
2
|
+
|
3
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
4
|
+
purpose with or without fee is hereby granted, provided that the above
|
5
|
+
copyright notice and this permission notice appear in all copies.
|
6
|
+
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
8
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
9
|
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
10
|
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
11
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
12
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
13
|
+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
@@ -0,0 +1,175 @@
|
|
1
|
+
2.0.4
|
2
|
+
* @jcekstrom - additional checking in integer parsing
|
3
|
+
* @jcekstrom - fix a bug in yajl_tree that would cause valid json integersto fail to parse
|
4
|
+
* @plaguemorin - fix a memory leak in yajl_tree (error strings were being leaked)
|
5
|
+
* @7AC - reset errno
|
6
|
+
* @ConradIrwin - include flags to reformatter to allow toggling of escape solidus option
|
7
|
+
|
8
|
+
2.0.3
|
9
|
+
* John Stamp generation of a pkgconfig file at build time.
|
10
|
+
* @robzuber bugfix in yajl_tree_get()
|
11
|
+
* @lloyd - fix for compilation on 64 bit windows
|
12
|
+
|
13
|
+
2.0.2
|
14
|
+
* lth fix typos in yajl_tree.h macros YAJL_IS_INTEGER and YAJL_IS_DOUBLE,
|
15
|
+
contributed by Artem S Vybornov.
|
16
|
+
* lth add #ifdef __cplusplus wrappers to yajl_tree to allow proper
|
17
|
+
usage from many populer C++ compilers.
|
18
|
+
|
19
|
+
2.0.1
|
20
|
+
* lth generator flag to allow client to specify they want
|
21
|
+
escaped solidi '/'. issue #28
|
22
|
+
* lth crash fix when yajl_parse() is never called. issue #27
|
23
|
+
|
24
|
+
2.0.0
|
25
|
+
* lth YAJL is now ISC licensed: http://en.wikipedia.org/wiki/ISC_license
|
26
|
+
* lth 20-35% (osx and linux respectively) parsing performance
|
27
|
+
improvement attained by tweaking string scanning (idea: @michaelrhanson).
|
28
|
+
* Florian Forster & lth - yajl_tree interface introduced as a higher level
|
29
|
+
interface to the parser (eats JSON, poops a memory representation)
|
30
|
+
* lth require a C99 compiler
|
31
|
+
* lth integers are now represented with long long (64bit+) on all platforms.
|
32
|
+
* lth size_t now used throughout to represent buffer lengths, so you can
|
33
|
+
safely manage buffers greater than 4GB.
|
34
|
+
* gno semantic improvements to yajl's API regarding partial value parsing and
|
35
|
+
trailing garbage
|
36
|
+
* lth new configuration mechanism for yajl, see yajl_config() and
|
37
|
+
yajl_gen_config()
|
38
|
+
* gno more allocation checking in more places
|
39
|
+
* gno remove usage of strtol, replace with custom implementation that cares
|
40
|
+
not about your locale.
|
41
|
+
* lth yajl_parse_complete renamed to yajl_complete_parse.
|
42
|
+
* lth add a switch to validate utf8 strings as they are generated.
|
43
|
+
* lth tests are a lot quieter in their output.
|
44
|
+
* lth addition of a little in tree performance benchmark, `perftest` in
|
45
|
+
perf/perftest.c
|
46
|
+
|
47
|
+
1.0.12
|
48
|
+
* Conrad Irwin - Parse null bytes correctly
|
49
|
+
* Mirek Rusin - fix LLVM warnings
|
50
|
+
* gno - Don't generate numbers for keys. closes #13
|
51
|
+
* lth - various win32 fixes, including build documentation improvements
|
52
|
+
* John Stamp - Don't export private symbols.
|
53
|
+
* John Stamp - Install yajl_version.h, not the template.
|
54
|
+
* John Stamp - Don't use -fPIC for static lib. Cmake will automatically add it for the shared.
|
55
|
+
* lth 0 fix paths embedded in dylib upon installation on osx. closes #11
|
56
|
+
|
57
|
+
1.0.11
|
58
|
+
* lth remove -Wno-missing-field-initializers for greater gcc compat (3.4.6)
|
59
|
+
|
60
|
+
1.0.10
|
61
|
+
* Brian Maher - yajl is now buildable without a c++ compiler present
|
62
|
+
* Brian Maher - fix header installation on OSX with cmake 2.8.0 installed
|
63
|
+
* lth & vitali - allow builder to specify alternate lib directory
|
64
|
+
for installation (i.e. lib64)
|
65
|
+
* Vitali Lovich - yajl version number now programatically accessible
|
66
|
+
* lth - prevent cmake from embedding rpaths in binaries. Static linking
|
67
|
+
makes this unneccesary.
|
68
|
+
|
69
|
+
1.0.9
|
70
|
+
* lth - fix inverted logic causing yajl_gen_double() to always fail on
|
71
|
+
win32 (thanks to Fredrik Kihlander for the report)
|
72
|
+
|
73
|
+
1.0.8
|
74
|
+
* Randall E. Barker - move dllexport defnitions so dlls with proper
|
75
|
+
exports can again be generated on windows
|
76
|
+
* lth - add yajl_get_bytes_consumed() which allows the client to
|
77
|
+
determine the offset as an error, as well as determine how
|
78
|
+
many bytes of an input buffer were consumed.
|
79
|
+
* lth - fixes to keep "error offset" up to date (like when the
|
80
|
+
client callback returns 0)
|
81
|
+
* Brian Maher - allow client to specify a printing function in
|
82
|
+
generation
|
83
|
+
|
84
|
+
1.0.7
|
85
|
+
* lth fix win32 build (isinf and isnan)
|
86
|
+
|
87
|
+
1.0.6
|
88
|
+
* lth fix several compiler warnings
|
89
|
+
* lth fix generation of invalid json from yajl_gen_double
|
90
|
+
(NaN is not JSON)
|
91
|
+
* jstamp support for combining short options in tools
|
92
|
+
* jstamp exit properly on errors from tools
|
93
|
+
* octo test success no longer depends on integer size
|
94
|
+
* max fix configure --prefix
|
95
|
+
|
96
|
+
1.0.5
|
97
|
+
* lth several performance improvements related to function
|
98
|
+
inlinin'
|
99
|
+
|
100
|
+
1.0.4
|
101
|
+
* lth fix broken utf8 validation for three & four byte represenations.
|
102
|
+
thanks to http://github.com/brianmario and
|
103
|
+
http://github.com/technoweenie
|
104
|
+
|
105
|
+
1.0.3
|
106
|
+
* lth fix syntax error in cplusplus extern "C" statements for wider
|
107
|
+
compiler support
|
108
|
+
|
109
|
+
1.0.2
|
110
|
+
* lth update doxygen documentation with new sample code, passing NULL
|
111
|
+
for allocation functions added in 1.0.0
|
112
|
+
|
113
|
+
1.0.1
|
114
|
+
* lth resolve crash in json_reformatter due to incorrectly ordered
|
115
|
+
parameters.
|
116
|
+
|
117
|
+
1.0.0
|
118
|
+
* lth add 'make install' rules, thaks to Andrei Soroker for the
|
119
|
+
contribution.
|
120
|
+
* lth client may override allocation routines at generator or parser
|
121
|
+
allocation time
|
122
|
+
* tjw add yajl_parse_complete routine to allow client to explicitly
|
123
|
+
specify end-of-input, solving the "lonely number" case, where
|
124
|
+
json text consists only of an element with no explicit syntactic
|
125
|
+
end.
|
126
|
+
* tjw many new test cases
|
127
|
+
* tjw cleanup of code for symmetry and ease of reading
|
128
|
+
* lth integration of patches from Robert Varga which cleanup
|
129
|
+
compilation warnings on 64 bit linux
|
130
|
+
|
131
|
+
0.4.0
|
132
|
+
* lth buffer overflow bug in yajl_gen_double s/%lf/%g/ - thanks to
|
133
|
+
Eric Bergstrome
|
134
|
+
* lth yajl_number callback to allow passthrough of arbitrary precision
|
135
|
+
numbers to client. Thanks to Hatem Nassrat.
|
136
|
+
* lth yajl_integer now deals in long, instead of long long. This
|
137
|
+
combined with yajl_number improves compiler compatibility while
|
138
|
+
maintaining precision.
|
139
|
+
* lth better ./configure && make experience (still requires cmake and
|
140
|
+
ruby)
|
141
|
+
* lth fix handling of special characters hex 0F and 1F in yajl_encode
|
142
|
+
(thanks to Robert Geiger)
|
143
|
+
* lth allow leading zeros in exponents (thanks to Hatem Nassrat)
|
144
|
+
|
145
|
+
0.3.0
|
146
|
+
* lth doxygen documentation (html & man) generated as part of the
|
147
|
+
build
|
148
|
+
* lth many documentation updates.
|
149
|
+
* lth fix to work with older versions of cmake (don't use LOOSE_LOOP
|
150
|
+
constructs)
|
151
|
+
* lth work around different behavior of freebsd 4 scanf. initialize
|
152
|
+
parameter to scanf to zero.
|
153
|
+
* lth all tests run 32x with ranging buffer sizes to stress stream
|
154
|
+
parsing
|
155
|
+
* lth yajl_test accepts -b option to allow read buffer size to be
|
156
|
+
set
|
157
|
+
* lth option to validate UTF8 added to parser (argument in
|
158
|
+
yajl_parser_cfg)
|
159
|
+
* lth fix buffer overrun when chunk ends inside \u escaped text
|
160
|
+
* lth support client cancelation
|
161
|
+
|
162
|
+
0.2.2
|
163
|
+
* lth on windows build debug with C7 symbols and no pdb files.
|
164
|
+
|
165
|
+
0.2.1
|
166
|
+
* fix yajl_reformat and yajl_verify to work on arbitrarily sized
|
167
|
+
inputs.
|
168
|
+
* fix win32 build break, clean up all errors and warnings.
|
169
|
+
* fix optimized build flags.
|
170
|
+
|
171
|
+
0.2.0
|
172
|
+
* optionally support comments in input text
|
173
|
+
|
174
|
+
0.1.0
|
175
|
+
* Initial release
|
@@ -0,0 +1,74 @@
|
|
1
|
+
**********************************************************************
|
2
|
+
This is YAJL 2. For the legacy version of YAJL see
|
3
|
+
https://github.com/lloyd/yajl/tree/1.x
|
4
|
+
**********************************************************************
|
5
|
+
|
6
|
+
Welcome to Yet Another JSON Library (YAJL)
|
7
|
+
|
8
|
+
## Why does the world need another C library for parsing JSON?
|
9
|
+
|
10
|
+
Good question. In a review of current C JSON parsing libraries I was
|
11
|
+
unable to find one that satisfies my requirements. Those are,
|
12
|
+
0. written in C
|
13
|
+
1. portable
|
14
|
+
2. robust -- as close to "crash proof" as possible
|
15
|
+
3. data representation independent
|
16
|
+
4. fast
|
17
|
+
5. generates verbose, useful error messages including context of where
|
18
|
+
the error occurs in the input text.
|
19
|
+
6. can parse JSON data off a stream, incrementally
|
20
|
+
7. simple to use
|
21
|
+
8. tiny
|
22
|
+
|
23
|
+
Numbers 3, 5, 6, and 7 were particularly hard to find, and were what
|
24
|
+
caused me to ultimately create YAJL. This document is a tour of some
|
25
|
+
of the more important aspects of YAJL.
|
26
|
+
|
27
|
+
## YAJL is Free.
|
28
|
+
|
29
|
+
Permissive licensing means you can use it in open source and
|
30
|
+
commercial products alike without any fees. My request beyond the
|
31
|
+
licensing is that if you find bugs drop me a email, or better yet,
|
32
|
+
fork and fix.
|
33
|
+
|
34
|
+
Porting YAJL should be trivial, the implementation is ANSI C. If you
|
35
|
+
port to new systems I'd love to hear of it and integrate your patches.
|
36
|
+
|
37
|
+
## YAJL is data representation independent.
|
38
|
+
|
39
|
+
BYODR! Many JSON libraries impose a structure based data representation
|
40
|
+
on you. This is a benefit in some cases and a drawback in others.
|
41
|
+
YAJL uses callbacks to remain agnostic of the in-memory representation.
|
42
|
+
So if you wish to build up an in-memory representation, you may do so
|
43
|
+
using YAJL, but you must bring the code that defines and populates the
|
44
|
+
in memory structure.
|
45
|
+
|
46
|
+
This also means that YAJL can be used by other (higher level) JSON
|
47
|
+
libraries if so desired.
|
48
|
+
|
49
|
+
## YAJL supports stream parsing
|
50
|
+
|
51
|
+
This means you do not need to hold the whole JSON representation in
|
52
|
+
textual form in memory. This makes YAJL ideal for filtering projects,
|
53
|
+
where you're converting YAJL from one form to another (i.e. XML). The
|
54
|
+
included JSON pretty printer is an example of such a filter program.
|
55
|
+
|
56
|
+
## YAJL is fast
|
57
|
+
|
58
|
+
Minimal memory copying is performed. YAJL, when possible, returns
|
59
|
+
pointers into the client provided text (i.e. for strings that have no
|
60
|
+
embedded escape chars, hopefully the common case). I've put a lot of
|
61
|
+
effort into profiling and tuning performance, but I have ignored a
|
62
|
+
couple possible performance improvements to keep the interface clean,
|
63
|
+
small, and flexible. My hope is that YAJL will perform comparably to
|
64
|
+
the fastest JSON parser out there.
|
65
|
+
|
66
|
+
YAJL should impose both minimal CPU and memory requirements on your
|
67
|
+
application.
|
68
|
+
|
69
|
+
## YAJL is tiny.
|
70
|
+
|
71
|
+
Fat free. No whip.
|
72
|
+
|
73
|
+
enjoy,
|
74
|
+
Lloyd - July, 2007
|
@@ -0,0 +1,9 @@
|
|
1
|
+
* add a test for 0x1F bug
|
2
|
+
* numeric overflow in integers and double
|
3
|
+
* line and char offsets in the lexer and in error messages
|
4
|
+
* testing:
|
5
|
+
a. the permuter
|
6
|
+
b. some performance comparison against json_checker.
|
7
|
+
* investigate pull instead of push parsing
|
8
|
+
* Handle memory allocation failures gracefully
|
9
|
+
* cygwin/msys support on win32
|
@@ -0,0 +1,26 @@
|
|
1
|
+
FIND_PROGRAM(doxygenPath doxygen)
|
2
|
+
|
3
|
+
IF (doxygenPath)
|
4
|
+
SET (YAJL_VERSION ${YAJL_MAJOR}.${YAJL_MINOR}.${YAJL_MICRO})
|
5
|
+
SET(yajlDirName yajl-${YAJL_VERSION})
|
6
|
+
SET(docPath
|
7
|
+
"${CMAKE_CURRENT_BINARY_DIR}/${yajlDirName}/share/doc/${yajlDirName}")
|
8
|
+
MESSAGE("** using doxygen at: ${doxygenPath}")
|
9
|
+
MESSAGE("** documentation output to: ${docPath}")
|
10
|
+
|
11
|
+
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/src/YAJL.dxy
|
12
|
+
${CMAKE_CURRENT_BINARY_DIR}/YAJL.dxy @ONLY)
|
13
|
+
|
14
|
+
FILE(MAKE_DIRECTORY "${docPath}")
|
15
|
+
|
16
|
+
ADD_CUSTOM_TARGET(doc
|
17
|
+
${doxygenPath} YAJL.dxy
|
18
|
+
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
19
|
+
|
20
|
+
ELSE (doxygenPath)
|
21
|
+
MESSAGE("!! doxygen not found, not generating documentation")
|
22
|
+
ADD_CUSTOM_TARGET(
|
23
|
+
doc
|
24
|
+
echo doxygen not installed, not generating documentation
|
25
|
+
)
|
26
|
+
ENDIF (doxygenPath)
|