ffi-yajl 0.0.4 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (180) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +114 -30
  3. data/ext/ffi_yajl/ext/encoder/extconf.rb +5 -5
  4. data/ext/ffi_yajl/ext/parser/extconf.rb +5 -5
  5. data/lib/ffi_yajl/ffi.rb +2 -1
  6. data/lib/ffi_yajl/version.rb +1 -1
  7. data/spec/ffi_yajl/encoder_spec.rb +6 -6
  8. data/spec/ffi_yajl/json_gem_spec.rb +13 -13
  9. data/spec/ffi_yajl/parser_spec.rb +9 -9
  10. metadata +16 -174
  11. data/ext/libyajl2/extconf.rb +0 -60
  12. data/ext/libyajl2/vendored/.gitignore +0 -3
  13. data/ext/libyajl2/vendored/BUILDING +0 -23
  14. data/ext/libyajl2/vendored/BUILDING.win32 +0 -27
  15. data/ext/libyajl2/vendored/CMakeLists.txt +0 -79
  16. data/ext/libyajl2/vendored/COPYING +0 -13
  17. data/ext/libyajl2/vendored/ChangeLog +0 -175
  18. data/ext/libyajl2/vendored/README +0 -74
  19. data/ext/libyajl2/vendored/TODO +0 -9
  20. data/ext/libyajl2/vendored/YAJLDoc.cmake +0 -26
  21. data/ext/libyajl2/vendored/configure +0 -79
  22. data/ext/libyajl2/vendored/example/CMakeLists.txt +0 -23
  23. data/ext/libyajl2/vendored/example/README.md +0 -7
  24. data/ext/libyajl2/vendored/example/parse_config.c +0 -69
  25. data/ext/libyajl2/vendored/example/sample.config +0 -101
  26. data/ext/libyajl2/vendored/perf/CMakeLists.txt +0 -23
  27. data/ext/libyajl2/vendored/perf/documents.c +0 -1418
  28. data/ext/libyajl2/vendored/perf/documents.h +0 -28
  29. data/ext/libyajl2/vendored/perf/perftest.c +0 -134
  30. data/ext/libyajl2/vendored/reformatter/CMakeLists.txt +0 -39
  31. data/ext/libyajl2/vendored/reformatter/json_reformat.c +0 -194
  32. data/ext/libyajl2/vendored/src/CMakeLists.txt +0 -86
  33. data/ext/libyajl2/vendored/src/YAJL.dxy +0 -1258
  34. data/ext/libyajl2/vendored/src/api/yajl_common.h +0 -75
  35. data/ext/libyajl2/vendored/src/api/yajl_gen.h +0 -157
  36. data/ext/libyajl2/vendored/src/api/yajl_parse.h +0 -226
  37. data/ext/libyajl2/vendored/src/api/yajl_tree.h +0 -185
  38. data/ext/libyajl2/vendored/src/api/yajl_version.h.cmake +0 -23
  39. data/ext/libyajl2/vendored/src/yajl +0 -33
  40. data/ext/libyajl2/vendored/src/yajl.c +0 -175
  41. data/ext/libyajl2/vendored/src/yajl.pc.cmake +0 -9
  42. data/ext/libyajl2/vendored/src/yajl_alloc.c +0 -52
  43. data/ext/libyajl2/vendored/src/yajl_alloc.h +0 -34
  44. data/ext/libyajl2/vendored/src/yajl_buf.c +0 -103
  45. data/ext/libyajl2/vendored/src/yajl_buf.h +0 -57
  46. data/ext/libyajl2/vendored/src/yajl_bytestack.h +0 -69
  47. data/ext/libyajl2/vendored/src/yajl_encode.c +0 -220
  48. data/ext/libyajl2/vendored/src/yajl_encode.h +0 -34
  49. data/ext/libyajl2/vendored/src/yajl_gen.c +0 -354
  50. data/ext/libyajl2/vendored/src/yajl_lex.c +0 -763
  51. data/ext/libyajl2/vendored/src/yajl_lex.h +0 -117
  52. data/ext/libyajl2/vendored/src/yajl_parser.c +0 -498
  53. data/ext/libyajl2/vendored/src/yajl_parser.h +0 -78
  54. data/ext/libyajl2/vendored/src/yajl_tree.c +0 -503
  55. data/ext/libyajl2/vendored/src/yajl_version.c +0 -7
  56. data/ext/libyajl2/vendored/test/CMakeLists.txt +0 -23
  57. data/ext/libyajl2/vendored/test/cases/ac_difficult_json_c_test_case_with_comments.json +0 -1
  58. data/ext/libyajl2/vendored/test/cases/ac_difficult_json_c_test_case_with_comments.json.gold +0 -36
  59. data/ext/libyajl2/vendored/test/cases/ac_simple_with_comments.json +0 -11
  60. data/ext/libyajl2/vendored/test/cases/ac_simple_with_comments.json.gold +0 -9
  61. data/ext/libyajl2/vendored/test/cases/ag_false_then_garbage.json +0 -1
  62. data/ext/libyajl2/vendored/test/cases/ag_false_then_garbage.json.gold +0 -2
  63. data/ext/libyajl2/vendored/test/cases/ag_null_then_garbage.json +0 -1
  64. data/ext/libyajl2/vendored/test/cases/ag_null_then_garbage.json.gold +0 -2
  65. data/ext/libyajl2/vendored/test/cases/ag_true_then_garbage.json +0 -1
  66. data/ext/libyajl2/vendored/test/cases/ag_true_then_garbage.json.gold +0 -2
  67. data/ext/libyajl2/vendored/test/cases/am_eof.json +0 -1
  68. data/ext/libyajl2/vendored/test/cases/am_eof.json.gold +0 -4
  69. data/ext/libyajl2/vendored/test/cases/am_integers.json +0 -1
  70. data/ext/libyajl2/vendored/test/cases/am_integers.json.gold +0 -3
  71. data/ext/libyajl2/vendored/test/cases/am_multiple.json +0 -3
  72. data/ext/libyajl2/vendored/test/cases/am_multiple.json.gold +0 -5
  73. data/ext/libyajl2/vendored/test/cases/am_stuff.json +0 -7
  74. data/ext/libyajl2/vendored/test/cases/am_stuff.json.gold +0 -14
  75. data/ext/libyajl2/vendored/test/cases/ap_array_open.json +0 -1
  76. data/ext/libyajl2/vendored/test/cases/ap_array_open.json.gold +0 -2
  77. data/ext/libyajl2/vendored/test/cases/ap_eof_str.json +0 -1
  78. data/ext/libyajl2/vendored/test/cases/ap_eof_str.json.gold +0 -1
  79. data/ext/libyajl2/vendored/test/cases/ap_map_open.json +0 -1
  80. data/ext/libyajl2/vendored/test/cases/ap_map_open.json.gold +0 -2
  81. data/ext/libyajl2/vendored/test/cases/ap_partial_ok.json +0 -1
  82. data/ext/libyajl2/vendored/test/cases/ap_partial_ok.json.gold +0 -4
  83. data/ext/libyajl2/vendored/test/cases/array.json +0 -6
  84. data/ext/libyajl2/vendored/test/cases/array.json.gold +0 -22
  85. data/ext/libyajl2/vendored/test/cases/array_close.json +0 -1
  86. data/ext/libyajl2/vendored/test/cases/array_close.json.gold +0 -2
  87. data/ext/libyajl2/vendored/test/cases/bignums.json +0 -1
  88. data/ext/libyajl2/vendored/test/cases/bignums.json.gold +0 -5
  89. data/ext/libyajl2/vendored/test/cases/bogus_char.json +0 -4
  90. data/ext/libyajl2/vendored/test/cases/bogus_char.json.gold +0 -10
  91. data/ext/libyajl2/vendored/test/cases/codepoints_from_unicode_org.json +0 -1
  92. data/ext/libyajl2/vendored/test/cases/codepoints_from_unicode_org.json.gold +0 -2
  93. data/ext/libyajl2/vendored/test/cases/deep_arrays.json +0 -1
  94. data/ext/libyajl2/vendored/test/cases/deep_arrays.json.gold +0 -2049
  95. data/ext/libyajl2/vendored/test/cases/difficult_json_c_test_case.json +0 -1
  96. data/ext/libyajl2/vendored/test/cases/difficult_json_c_test_case.json.gold +0 -36
  97. data/ext/libyajl2/vendored/test/cases/doubles.json +0 -1
  98. data/ext/libyajl2/vendored/test/cases/doubles.json.gold +0 -7
  99. data/ext/libyajl2/vendored/test/cases/doubles_in_array.json +0 -1
  100. data/ext/libyajl2/vendored/test/cases/doubles_in_array.json.gold +0 -8
  101. data/ext/libyajl2/vendored/test/cases/empty_array.json +0 -1
  102. data/ext/libyajl2/vendored/test/cases/empty_array.json.gold +0 -3
  103. data/ext/libyajl2/vendored/test/cases/empty_string.json +0 -1
  104. data/ext/libyajl2/vendored/test/cases/empty_string.json.gold +0 -2
  105. data/ext/libyajl2/vendored/test/cases/escaped_bulgarian.json +0 -4
  106. data/ext/libyajl2/vendored/test/cases/escaped_bulgarian.json.gold +0 -7
  107. data/ext/libyajl2/vendored/test/cases/escaped_foobar.json +0 -1
  108. data/ext/libyajl2/vendored/test/cases/escaped_foobar.json.gold +0 -2
  109. data/ext/libyajl2/vendored/test/cases/false.json +0 -1
  110. data/ext/libyajl2/vendored/test/cases/false.json.gold +0 -2
  111. data/ext/libyajl2/vendored/test/cases/fg_false_then_garbage.json +0 -1
  112. data/ext/libyajl2/vendored/test/cases/fg_false_then_garbage.json.gold +0 -3
  113. data/ext/libyajl2/vendored/test/cases/fg_issue_7.json +0 -1
  114. data/ext/libyajl2/vendored/test/cases/fg_issue_7.json.gold +0 -3
  115. data/ext/libyajl2/vendored/test/cases/fg_null_then_garbage.json +0 -1
  116. data/ext/libyajl2/vendored/test/cases/fg_null_then_garbage.json.gold +0 -3
  117. data/ext/libyajl2/vendored/test/cases/fg_true_then_garbage.json +0 -1
  118. data/ext/libyajl2/vendored/test/cases/fg_true_then_garbage.json.gold +0 -3
  119. data/ext/libyajl2/vendored/test/cases/four_byte_utf8.json +0 -2
  120. data/ext/libyajl2/vendored/test/cases/four_byte_utf8.json.gold +0 -5
  121. data/ext/libyajl2/vendored/test/cases/high_overflow.json +0 -1
  122. data/ext/libyajl2/vendored/test/cases/high_overflow.json.gold +0 -2
  123. data/ext/libyajl2/vendored/test/cases/integers.json +0 -3
  124. data/ext/libyajl2/vendored/test/cases/integers.json.gold +0 -14
  125. data/ext/libyajl2/vendored/test/cases/invalid_utf8.json +0 -1
  126. data/ext/libyajl2/vendored/test/cases/invalid_utf8.json.gold +0 -3
  127. data/ext/libyajl2/vendored/test/cases/isolated_surrogate_marker.json +0 -1
  128. data/ext/libyajl2/vendored/test/cases/isolated_surrogate_marker.json.gold +0 -2
  129. data/ext/libyajl2/vendored/test/cases/leading_zero_in_number.json +0 -1
  130. data/ext/libyajl2/vendored/test/cases/leading_zero_in_number.json.gold +0 -5
  131. data/ext/libyajl2/vendored/test/cases/lonely_minus_sign.json +0 -7
  132. data/ext/libyajl2/vendored/test/cases/lonely_minus_sign.json.gold +0 -9
  133. data/ext/libyajl2/vendored/test/cases/lonely_number.json +0 -1
  134. data/ext/libyajl2/vendored/test/cases/lonely_number.json.gold +0 -2
  135. data/ext/libyajl2/vendored/test/cases/low_overflow.json +0 -1
  136. data/ext/libyajl2/vendored/test/cases/low_overflow.json.gold +0 -2
  137. data/ext/libyajl2/vendored/test/cases/map_close.json +0 -1
  138. data/ext/libyajl2/vendored/test/cases/map_close.json.gold +0 -2
  139. data/ext/libyajl2/vendored/test/cases/missing_integer_after_decimal_point.json +0 -1
  140. data/ext/libyajl2/vendored/test/cases/missing_integer_after_decimal_point.json.gold +0 -2
  141. data/ext/libyajl2/vendored/test/cases/missing_integer_after_exponent.json +0 -1
  142. data/ext/libyajl2/vendored/test/cases/missing_integer_after_exponent.json.gold +0 -2
  143. data/ext/libyajl2/vendored/test/cases/multiple.json +0 -3
  144. data/ext/libyajl2/vendored/test/cases/multiple.json.gold +0 -4
  145. data/ext/libyajl2/vendored/test/cases/non_utf8_char_in_string.json +0 -1
  146. data/ext/libyajl2/vendored/test/cases/non_utf8_char_in_string.json.gold +0 -8
  147. data/ext/libyajl2/vendored/test/cases/np_partial_bad.json +0 -1
  148. data/ext/libyajl2/vendored/test/cases/np_partial_bad.json.gold +0 -5
  149. data/ext/libyajl2/vendored/test/cases/null.json +0 -1
  150. data/ext/libyajl2/vendored/test/cases/null.json.gold +0 -2
  151. data/ext/libyajl2/vendored/test/cases/nulls_and_bools.json +0 -5
  152. data/ext/libyajl2/vendored/test/cases/nulls_and_bools.json.gold +0 -9
  153. data/ext/libyajl2/vendored/test/cases/simple.json +0 -5
  154. data/ext/libyajl2/vendored/test/cases/simple.json.gold +0 -9
  155. data/ext/libyajl2/vendored/test/cases/simple_with_comments.json +0 -11
  156. data/ext/libyajl2/vendored/test/cases/simple_with_comments.json.gold +0 -5
  157. data/ext/libyajl2/vendored/test/cases/string_invalid_escape.json +0 -1
  158. data/ext/libyajl2/vendored/test/cases/string_invalid_escape.json.gold +0 -3
  159. data/ext/libyajl2/vendored/test/cases/string_invalid_hex_char.json +0 -1
  160. data/ext/libyajl2/vendored/test/cases/string_invalid_hex_char.json.gold +0 -2
  161. data/ext/libyajl2/vendored/test/cases/string_with_escapes.json +0 -3
  162. data/ext/libyajl2/vendored/test/cases/string_with_escapes.json.gold +0 -7
  163. data/ext/libyajl2/vendored/test/cases/string_with_invalid_newline.json +0 -2
  164. data/ext/libyajl2/vendored/test/cases/string_with_invalid_newline.json.gold +0 -2
  165. data/ext/libyajl2/vendored/test/cases/three_byte_utf8.json +0 -1
  166. data/ext/libyajl2/vendored/test/cases/three_byte_utf8.json.gold +0 -7
  167. data/ext/libyajl2/vendored/test/cases/true.json +0 -1
  168. data/ext/libyajl2/vendored/test/cases/true.json.gold +0 -2
  169. data/ext/libyajl2/vendored/test/cases/unescaped_bulgarian.json +0 -1
  170. data/ext/libyajl2/vendored/test/cases/unescaped_bulgarian.json.gold +0 -4
  171. data/ext/libyajl2/vendored/test/cases/zerobyte.json +0 -1
  172. data/ext/libyajl2/vendored/test/cases/zerobyte.json.gold +0 -0
  173. data/ext/libyajl2/vendored/test/run_tests.sh +0 -94
  174. data/ext/libyajl2/vendored/test/yajl_test.c +0 -281
  175. data/ext/libyajl2/vendored/verify/CMakeLists.txt +0 -39
  176. data/ext/libyajl2/vendored/verify/json_verify.c +0 -116
  177. data/lib/libyajl.so +0 -0
  178. data/lib/libyajl.so.2 +0 -0
  179. data/lib/libyajl.so.2.0.5 +0 -0
  180. data/lib/libyajl_s.a +0 -0
@@ -1,60 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'rbconfig'
4
-
5
- cflags = ENV['CFLAGS']
6
- ldflags = ENV['LDFLAGS']
7
- cc = ENV['CC']
8
-
9
- # use the CC that ruby was compiled with by default
10
- cc ||= RbConfig::MAKEFILE_CONFIG['CC']
11
- cflags ||= ""
12
- ldflags ||= ""
13
-
14
- # then ultimately default back to gcc
15
- cc ||= "gcc"
16
-
17
- # FIXME: add more compilers with default options
18
- if cc =~ /gcc|clang/
19
- cflags << " -O3" unless cflags =~ /-O\d/
20
- cflags << " -Wall"
21
- end
22
-
23
- if !defined?(RUBY_ENGINE) || RUBY_ENGINE == 'ruby' || RUBY_ENGINE == 'rbx'
24
- require 'mkmf'
25
-
26
- # yajl_complete_parse is only in >= 2.0
27
- libyajl2_ok = have_library("yajl", "yajl_complete_parse", [ "yajl/yajl_parse.h" ]) && have_func("yajl_complete_parse")
28
- else
29
- # always install libyajl2 on Jruby
30
- # FIXME: get the conditional mkmf stuff to work on Jruby
31
- libyajl2_ok = false
32
- end
33
-
34
- prefix=File.expand_path(File.join(File.dirname(__FILE__), "..", ".."))
35
-
36
- #dir_config 'libyajl2'
37
-
38
- if libyajl2_ok
39
- File.open("Makefile", "w") do |mf|
40
- mf.puts "# Dummy makefile when we don't build the library"
41
- mf.puts "all install::\n"
42
- end
43
- else
44
- ENV['CFLAGS'] = cflags
45
- ENV['LDFLAGS'] = ldflags
46
- ENV['CC'] = cc
47
- system("cp -rf #{File.expand_path(File.join(File.dirname(__FILE__), "vendored"))} .") unless File.exists?("vendored")
48
-
49
- File.open("Makefile", "w") do |mf|
50
- mf.puts "# Makefile for building vendored libyajl2"
51
- mf.puts "CFLAGS = #{ENV['CFLAGS']}"
52
- mf.puts "LDFLAGS = #{ENV['LDFLAGS']}"
53
- mf.puts "CC = #{ENV['CC']}\n"
54
- mf.puts "all install::"
55
- mf.puts "\tcd vendored && ./configure --prefix=#{prefix}"
56
- mf.puts "\tcd vendored && make install"
57
- mf.puts "\tcp -f vendored/build/yajl-2.0.5/lib/libyajl.so .\n"
58
- end
59
- end
60
-
@@ -1,3 +0,0 @@
1
- .DS_Store
2
- Makefile
3
- /build/
@@ -1,23 +0,0 @@
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
@@ -1,27 +0,0 @@
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.
@@ -1,79 +0,0 @@
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
-
@@ -1,13 +0,0 @@
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.
@@ -1,175 +0,0 @@
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
@@ -1,74 +0,0 @@
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