json_pure 1.5.1 → 1.5.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +5 -0
- data/{README → README.rdoc} +0 -0
- data/Rakefile +41 -55
- data/VERSION +1 -1
- data/ext/json/ext/generator/generator.c +11 -10
- data/ext/json/ext/generator/generator.h +3 -3
- data/ext/json/ext/parser/parser.c +81 -71
- data/ext/json/ext/parser/parser.h +5 -5
- data/ext/json/ext/parser/parser.rl +13 -3
- data/java/src/json/ext/Generator.java +1 -5
- data/java/src/json/ext/Parser.java +34 -26
- data/java/src/json/ext/Parser.rl +10 -2
- data/json.gemspec +41 -0
- data/json_pure.gemspec +40 -0
- data/lib/json.rb +52 -0
- data/lib/json/add/core.rb +35 -4
- data/lib/json/common.rb +5 -1
- data/lib/json/pure/generator.rb +1 -1
- data/lib/json/version.rb +1 -1
- data/tests/test_json.rb +25 -6
- data/tests/test_json_generate.rb +1 -0
- metadata +163 -139
data/lib/json/add/core.rb
CHANGED
@@ -6,20 +6,26 @@ unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
|
|
6
6
|
end
|
7
7
|
require 'date'
|
8
8
|
|
9
|
+
# Symbol serialization/deserialization
|
9
10
|
class Symbol
|
11
|
+
# Stores class name (Symbol) with String representation of Symbol as a JSON string.
|
10
12
|
def to_json(*a)
|
11
13
|
{
|
12
14
|
JSON.create_id => self.class.name,
|
13
15
|
's' => to_s,
|
14
16
|
}.to_json(*a)
|
15
17
|
end
|
16
|
-
|
18
|
+
|
19
|
+
# Deserializes JSON string by converting the <tt>string</tt> value stored in the object to a Symbol
|
17
20
|
def self.json_create(o)
|
18
21
|
o['s'].to_sym
|
19
22
|
end
|
20
23
|
end
|
21
24
|
|
25
|
+
# Time serialization/deserialization
|
22
26
|
class Time
|
27
|
+
|
28
|
+
# Deserializes JSON string by converting time since epoch to Time
|
23
29
|
def self.json_create(object)
|
24
30
|
if usec = object.delete('u') # used to be tv_usec -> tv_nsec
|
25
31
|
object['n'] = usec * 1000
|
@@ -30,7 +36,8 @@ class Time
|
|
30
36
|
at(object['s'], object['n'] / 1000)
|
31
37
|
end
|
32
38
|
end
|
33
|
-
|
39
|
+
|
40
|
+
# Stores class name (Time) with number of seconds since epoch and number of microseconds for Time as JSON string
|
34
41
|
def to_json(*args)
|
35
42
|
{
|
36
43
|
JSON.create_id => self.class.name,
|
@@ -40,13 +47,17 @@ class Time
|
|
40
47
|
end
|
41
48
|
end
|
42
49
|
|
50
|
+
# Date serialization/deserialization
|
43
51
|
class Date
|
52
|
+
|
53
|
+
# Deserializes JSON string by converting Julian year <tt>y</tt>, month <tt>m</tt>, day <tt>d</tt> and Day of Calendar Reform <tt>sg</tt> to Date.
|
44
54
|
def self.json_create(object)
|
45
55
|
civil(*object.values_at('y', 'm', 'd', 'sg'))
|
46
56
|
end
|
47
57
|
|
48
58
|
alias start sg unless method_defined?(:start)
|
49
|
-
|
59
|
+
|
60
|
+
# Stores class name (Date) with Julian year <tt>y</tt>, month <tt>m</tt>, day <tt>d</tt> and Day of Calendar Reform <tt>sg</tt> as JSON string
|
50
61
|
def to_json(*args)
|
51
62
|
{
|
52
63
|
JSON.create_id => self.class.name,
|
@@ -58,7 +69,10 @@ class Date
|
|
58
69
|
end
|
59
70
|
end
|
60
71
|
|
72
|
+
# DateTime serialization/deserialization
|
61
73
|
class DateTime
|
74
|
+
|
75
|
+
# Deserializes JSON string by converting year <tt>y</tt>, month <tt>m</tt>, day <tt>d</tt>, hour <tt>H</tt>, minute <tt>M</tt>, second <tt>S</tt>, offset <tt>of</tt> and Day of Calendar Reform <tt>sg</tt> to DateTime.
|
62
76
|
def self.json_create(object)
|
63
77
|
args = object.values_at('y', 'm', 'd', 'H', 'M', 'S')
|
64
78
|
of_a, of_b = object['of'].split('/')
|
@@ -72,7 +86,8 @@ class DateTime
|
|
72
86
|
end
|
73
87
|
|
74
88
|
alias start sg unless method_defined?(:start)
|
75
|
-
|
89
|
+
|
90
|
+
# Stores class name (DateTime) with Julian year <tt>y</tt>, month <tt>m</tt>, day <tt>d</tt>, hour <tt>H</tt>, minute <tt>M</tt>, second <tt>S</tt>, offset <tt>of</tt> and Day of Calendar Reform <tt>sg</tt> as JSON string
|
76
91
|
def to_json(*args)
|
77
92
|
{
|
78
93
|
JSON.create_id => self.class.name,
|
@@ -88,11 +103,15 @@ class DateTime
|
|
88
103
|
end
|
89
104
|
end
|
90
105
|
|
106
|
+
# Range serialization/deserialization
|
91
107
|
class Range
|
108
|
+
|
109
|
+
# Deserializes JSON string by constructing new Range object with arguments <tt>a</tt> serialized by <tt>to_json</tt>.
|
92
110
|
def self.json_create(object)
|
93
111
|
new(*object['a'])
|
94
112
|
end
|
95
113
|
|
114
|
+
# Stores class name (Range) with JSON array of arguments <tt>a</tt> which include <tt>first</tt> (integer), <tt>last</tt> (integer), and <tt>exclude_end?</tt> (boolean) as JSON string.
|
96
115
|
def to_json(*args)
|
97
116
|
{
|
98
117
|
JSON.create_id => self.class.name,
|
@@ -101,11 +120,15 @@ class Range
|
|
101
120
|
end
|
102
121
|
end
|
103
122
|
|
123
|
+
# Struct serialization/deserialization
|
104
124
|
class Struct
|
125
|
+
|
126
|
+
# Deserializes JSON string by constructing new Struct object with values <tt>v</tt> serialized by <tt>to_json</tt>.
|
105
127
|
def self.json_create(object)
|
106
128
|
new(*object['v'])
|
107
129
|
end
|
108
130
|
|
131
|
+
# Stores class name (Struct) with Struct values <tt>v</tt> as a JSON string. Only named structs are supported.
|
109
132
|
def to_json(*args)
|
110
133
|
klass = self.class.name
|
111
134
|
klass.to_s.empty? and raise JSON::JSONError, "Only named structs are supported!"
|
@@ -116,13 +139,17 @@ class Struct
|
|
116
139
|
end
|
117
140
|
end
|
118
141
|
|
142
|
+
# Exception serialization/deserialization
|
119
143
|
class Exception
|
144
|
+
|
145
|
+
# Deserializes JSON string by constructing new Exception object with message <tt>m</tt> and backtrace <tt>b</tt> serialized with <tt>to_json</tt>
|
120
146
|
def self.json_create(object)
|
121
147
|
result = new(object['m'])
|
122
148
|
result.set_backtrace object['b']
|
123
149
|
result
|
124
150
|
end
|
125
151
|
|
152
|
+
# Stores class name (Exception) with message <tt>m</tt> and backtrace array <tt>b</tt> as JSON string
|
126
153
|
def to_json(*args)
|
127
154
|
{
|
128
155
|
JSON.create_id => self.class.name,
|
@@ -132,11 +159,15 @@ class Exception
|
|
132
159
|
end
|
133
160
|
end
|
134
161
|
|
162
|
+
# Regexp serialization/deserialization
|
135
163
|
class Regexp
|
164
|
+
|
165
|
+
# Deserializes JSON string by constructing new Regexp object with source <tt>s</tt> (Regexp or String) and options <tt>o</tt> serialized by <tt>to_json</tt>
|
136
166
|
def self.json_create(object)
|
137
167
|
new(object['s'], object['o'])
|
138
168
|
end
|
139
169
|
|
170
|
+
# Stores class name (Regexp) with options <tt>o</tt> and source <tt>s</tt> (Regexp or String) as JSON string
|
140
171
|
def to_json(*)
|
141
172
|
{
|
142
173
|
JSON.create_id => self.class.name,
|
data/lib/json/common.rb
CHANGED
@@ -291,7 +291,8 @@ module JSON
|
|
291
291
|
recurse_proc(result, &proc) if proc
|
292
292
|
result
|
293
293
|
end
|
294
|
-
|
294
|
+
|
295
|
+
# Recursively calls passed _Proc_ if the parsed data structure is an _Array_ or _Hash_
|
295
296
|
def recurse_proc(result, &proc)
|
296
297
|
case result
|
297
298
|
when Array
|
@@ -351,11 +352,13 @@ module JSON
|
|
351
352
|
|
352
353
|
# Shortuct for iconv.
|
353
354
|
if ::String.method_defined?(:encode)
|
355
|
+
# Encodes string using Ruby's _String.encode_
|
354
356
|
def self.iconv(to, from, string)
|
355
357
|
string.encode(to, from)
|
356
358
|
end
|
357
359
|
else
|
358
360
|
require 'iconv'
|
361
|
+
# Encodes string using _iconv_ library
|
359
362
|
def self.iconv(to, from, string)
|
360
363
|
Iconv.iconv(to, from, string).first
|
361
364
|
end
|
@@ -408,6 +411,7 @@ module ::Kernel
|
|
408
411
|
end
|
409
412
|
end
|
410
413
|
|
414
|
+
# Extends any Class to include _json_creatable?_ method.
|
411
415
|
class ::Class
|
412
416
|
# Returns true, if this class can be used to create an instance
|
413
417
|
# from a serialised JSON string. The class has to implement a class
|
data/lib/json/pure/generator.rb
CHANGED
@@ -99,7 +99,7 @@ module JSON
|
|
99
99
|
module Pure
|
100
100
|
module Generator
|
101
101
|
# This class is used to create State instances, that are use to hold data
|
102
|
-
# while generating a JSON text from a
|
102
|
+
# while generating a JSON text from a Ruby data structure.
|
103
103
|
class State
|
104
104
|
# Creates a State object from _opts_, which ought to be Hash to create
|
105
105
|
# a new State instance configured by _opts_, something else to create
|
data/lib/json/version.rb
CHANGED
data/tests/test_json.rb
CHANGED
@@ -154,7 +154,16 @@ class TC_JSON < Test::Unit::TestCase
|
|
154
154
|
, [2718.0E-3 ],\r[ null] , [[1, -2, 3 ]], [false ],[ true]\n ] }))
|
155
155
|
end
|
156
156
|
|
157
|
-
class SubArray < Array
|
157
|
+
class SubArray < Array
|
158
|
+
def <<(v)
|
159
|
+
@shifted = true
|
160
|
+
super
|
161
|
+
end
|
162
|
+
|
163
|
+
def shifted?
|
164
|
+
@shifted
|
165
|
+
end
|
166
|
+
end
|
158
167
|
|
159
168
|
class SubArray2 < Array
|
160
169
|
def to_json(*a)
|
@@ -171,9 +180,10 @@ class TC_JSON < Test::Unit::TestCase
|
|
171
180
|
end
|
172
181
|
|
173
182
|
def test_parse_array_custom_class
|
174
|
-
res = parse('[]', :array_class => SubArray)
|
175
|
-
assert_equal([], res)
|
183
|
+
res = parse('[1,2]', :array_class => SubArray)
|
184
|
+
assert_equal([1,2], res)
|
176
185
|
assert_equal(SubArray, res.class)
|
186
|
+
assert res.shifted?
|
177
187
|
end
|
178
188
|
|
179
189
|
def test_parse_object
|
@@ -184,6 +194,14 @@ class TC_JSON < Test::Unit::TestCase
|
|
184
194
|
end
|
185
195
|
|
186
196
|
class SubHash < Hash
|
197
|
+
def []=(k, v)
|
198
|
+
@item_set = true
|
199
|
+
super
|
200
|
+
end
|
201
|
+
|
202
|
+
def item_set?
|
203
|
+
@item_set
|
204
|
+
end
|
187
205
|
end
|
188
206
|
|
189
207
|
class SubHash2 < Hash
|
@@ -200,9 +218,10 @@ class TC_JSON < Test::Unit::TestCase
|
|
200
218
|
end
|
201
219
|
|
202
220
|
def test_parse_object_custom_class
|
203
|
-
res = parse('{}', :object_class =>
|
204
|
-
assert_equal({}, res)
|
205
|
-
assert_equal(
|
221
|
+
res = parse('{"foo":"bar"}', :object_class => SubHash)
|
222
|
+
assert_equal({"foo" => "bar"}, res)
|
223
|
+
assert_equal(SubHash, res.class)
|
224
|
+
assert res.item_set?
|
206
225
|
end
|
207
226
|
|
208
227
|
def test_generation_of_core_subclasses_with_new_to_json
|
data/tests/test_json_generate.rb
CHANGED
@@ -54,6 +54,7 @@ EOT
|
|
54
54
|
|
55
55
|
def test_generate_pretty
|
56
56
|
json = pretty_generate(@hash)
|
57
|
+
# hashes aren't (insertion) ordered on every ruby implementation assert_equal(@json3, json)
|
57
58
|
assert_equal(JSON.parse(@json3), JSON.parse(json))
|
58
59
|
parsed_json = parse(json)
|
59
60
|
assert_equal(@hash, parsed_json)
|
metadata
CHANGED
@@ -1,12 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: json_pure
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
5
|
-
|
6
|
-
- 1
|
7
|
-
- 5
|
8
|
-
- 1
|
9
|
-
version: 1.5.1
|
4
|
+
prerelease:
|
5
|
+
version: 1.5.2
|
10
6
|
platform: ruby
|
11
7
|
authors:
|
12
8
|
- Florian Frank
|
@@ -14,10 +10,41 @@ autorequire:
|
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
12
|
|
17
|
-
date: 2011-
|
18
|
-
|
19
|
-
|
20
|
-
|
13
|
+
date: 2011-06-14 00:00:00 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: permutation
|
17
|
+
prerelease: false
|
18
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
19
|
+
none: false
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: "0"
|
24
|
+
type: :development
|
25
|
+
version_requirements: *id001
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: bullshit
|
28
|
+
prerelease: false
|
29
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
30
|
+
none: false
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: "0"
|
35
|
+
type: :development
|
36
|
+
version_requirements: *id002
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: sdoc
|
39
|
+
prerelease: false
|
40
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: "0"
|
46
|
+
type: :development
|
47
|
+
version_requirements: *id003
|
21
48
|
description: This is a JSON implementation in pure Ruby.
|
22
49
|
email: flori@ping.de
|
23
50
|
executables:
|
@@ -26,151 +53,152 @@ executables:
|
|
26
53
|
extensions: []
|
27
54
|
|
28
55
|
extra_rdoc_files:
|
29
|
-
- README
|
56
|
+
- README.rdoc
|
30
57
|
files:
|
31
|
-
-
|
32
|
-
-
|
33
|
-
-
|
34
|
-
-
|
35
|
-
-
|
58
|
+
- tests/test_json_string_matching.rb
|
59
|
+
- tests/test_json_fixtures.rb
|
60
|
+
- tests/setup_variant.rb
|
61
|
+
- tests/fixtures/fail6.json
|
62
|
+
- tests/fixtures/fail9.json
|
63
|
+
- tests/fixtures/fail10.json
|
64
|
+
- tests/fixtures/fail24.json
|
65
|
+
- tests/fixtures/fail28.json
|
66
|
+
- tests/fixtures/fail13.json
|
67
|
+
- tests/fixtures/fail4.json
|
68
|
+
- tests/fixtures/pass3.json
|
69
|
+
- tests/fixtures/fail11.json
|
70
|
+
- tests/fixtures/fail14.json
|
71
|
+
- tests/fixtures/fail3.json
|
72
|
+
- tests/fixtures/fail12.json
|
73
|
+
- tests/fixtures/pass16.json
|
74
|
+
- tests/fixtures/pass15.json
|
75
|
+
- tests/fixtures/fail20.json
|
76
|
+
- tests/fixtures/fail8.json
|
77
|
+
- tests/fixtures/pass2.json
|
78
|
+
- tests/fixtures/fail5.json
|
79
|
+
- tests/fixtures/fail1.json
|
80
|
+
- tests/fixtures/fail25.json
|
81
|
+
- tests/fixtures/pass17.json
|
82
|
+
- tests/fixtures/fail7.json
|
83
|
+
- tests/fixtures/pass26.json
|
84
|
+
- tests/fixtures/fail21.json
|
85
|
+
- tests/fixtures/pass1.json
|
86
|
+
- tests/fixtures/fail23.json
|
87
|
+
- tests/fixtures/fail18.json
|
88
|
+
- tests/fixtures/fail2.json
|
89
|
+
- tests/fixtures/fail22.json
|
90
|
+
- tests/fixtures/fail27.json
|
91
|
+
- tests/fixtures/fail19.json
|
92
|
+
- tests/test_json_unicode.rb
|
93
|
+
- tests/test_json_addition.rb
|
94
|
+
- tests/test_json_generate.rb
|
95
|
+
- tests/test_json_encoding.rb
|
96
|
+
- tests/test_json.rb
|
97
|
+
- COPYING
|
36
98
|
- TODO
|
37
|
-
-
|
38
|
-
- benchmarks/
|
39
|
-
- benchmarks/parser_benchmark.rb
|
99
|
+
- Rakefile
|
100
|
+
- benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt#parser.dat
|
40
101
|
- benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure.log
|
41
|
-
- benchmarks/data-p4-3GHz-ruby18/
|
102
|
+
- benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML.log
|
103
|
+
- benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails.log
|
104
|
+
- benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails.log
|
105
|
+
- benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_safe.dat
|
42
106
|
- benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML#parser.dat
|
43
|
-
- benchmarks/data-p4-3GHz-ruby18/
|
44
|
-
- benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt#parser.dat
|
45
|
-
- benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_fast.dat
|
46
|
-
- benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_fast-autocorrelation.dat
|
107
|
+
- benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails#generator.dat
|
47
108
|
- benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure.log
|
109
|
+
- benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_pretty-autocorrelation.dat
|
110
|
+
- benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure#parser-autocorrelation.dat
|
48
111
|
- benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt#parser-autocorrelation.dat
|
49
|
-
- benchmarks/data-p4-3GHz-ruby18/
|
112
|
+
- benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure#parser.dat
|
113
|
+
- benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails#parser-autocorrelation.dat
|
114
|
+
- benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt.log
|
115
|
+
- benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_fast.dat
|
116
|
+
- benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_safe.dat
|
117
|
+
- benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_pretty.dat
|
118
|
+
- benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkComparison.log
|
119
|
+
- benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails#parser.dat
|
50
120
|
- benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt.log
|
121
|
+
- benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_safe-autocorrelation.dat
|
122
|
+
- benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails#generator-autocorrelation.dat
|
123
|
+
- benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_fast-autocorrelation.dat
|
124
|
+
- benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_pretty.dat
|
51
125
|
- benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_fast-autocorrelation.dat
|
52
126
|
- benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_fast.dat
|
53
|
-
- benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails#parser.dat
|
54
|
-
- benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_pretty-autocorrelation.dat
|
55
|
-
- benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure#parser-autocorrelation.dat
|
56
|
-
- benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_pretty.dat
|
57
|
-
- benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails.log
|
58
|
-
- benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt.log
|
59
|
-
- benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails.log
|
60
127
|
- benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkComparison.log
|
61
|
-
- benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_safe.dat
|
62
|
-
- benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails#generator.dat
|
63
|
-
- benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_safe-autocorrelation.dat
|
64
|
-
- benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_pretty.dat
|
65
|
-
- benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML.log
|
66
|
-
- benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML#parser-autocorrelation.dat
|
67
128
|
- benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_pretty-autocorrelation.dat
|
68
|
-
- benchmarks/data-p4-3GHz-ruby18/
|
69
|
-
- benchmarks/data-p4-3GHz-ruby18/
|
70
|
-
- benchmarks/
|
129
|
+
- benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML#parser-autocorrelation.dat
|
130
|
+
- benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_safe-autocorrelation.dat
|
131
|
+
- benchmarks/parser2_benchmark.rb
|
132
|
+
- benchmarks/parser_benchmark.rb
|
71
133
|
- benchmarks/generator2_benchmark.rb
|
72
134
|
- benchmarks/generator_benchmark.rb
|
73
|
-
- benchmarks/parser2_benchmark.rb
|
74
135
|
- benchmarks/ohai.ruby
|
75
|
-
-
|
76
|
-
-
|
77
|
-
-
|
136
|
+
- benchmarks/ohai.json
|
137
|
+
- lib/json/json.xpm
|
138
|
+
- lib/json/TrueClass.xpm
|
139
|
+
- lib/json/version.rb
|
140
|
+
- lib/json/Array.xpm
|
141
|
+
- lib/json/add/core.rb
|
142
|
+
- lib/json/add/rails.rb
|
143
|
+
- lib/json/common.rb
|
144
|
+
- lib/json/pure/generator.rb
|
145
|
+
- lib/json/pure/parser.rb
|
146
|
+
- lib/json/ext.rb
|
147
|
+
- lib/json/pure.rb
|
148
|
+
- lib/json/Key.xpm
|
149
|
+
- lib/json/FalseClass.xpm
|
150
|
+
- lib/json/editor.rb
|
151
|
+
- lib/json/Numeric.xpm
|
152
|
+
- lib/json/NilClass.xpm
|
153
|
+
- lib/json/String.xpm
|
154
|
+
- lib/json/Hash.xpm
|
155
|
+
- lib/json.rb
|
156
|
+
- README.rdoc
|
157
|
+
- json_pure.gemspec
|
158
|
+
- GPL
|
159
|
+
- CHANGES
|
160
|
+
- bin/prettify_json.rb
|
161
|
+
- bin/edit_json.rb
|
162
|
+
- COPYING-json-jruby
|
163
|
+
- ext/json/ext/parser/parser.h
|
78
164
|
- ext/json/ext/parser/extconf.rb
|
79
165
|
- ext/json/ext/parser/parser.rl
|
80
|
-
- ext/json/ext/parser/parser.h
|
81
166
|
- ext/json/ext/parser/parser.c
|
82
|
-
-
|
83
|
-
-
|
84
|
-
-
|
85
|
-
-
|
167
|
+
- ext/json/ext/generator/generator.c
|
168
|
+
- ext/json/ext/generator/extconf.rb
|
169
|
+
- ext/json/ext/generator/generator.h
|
170
|
+
- VERSION
|
171
|
+
- data/prototype.js
|
172
|
+
- data/index.html
|
173
|
+
- data/example.json
|
174
|
+
- json.gemspec
|
175
|
+
- java/src/json/ext/Parser.java
|
176
|
+
- java/src/json/ext/RuntimeInfo.java
|
177
|
+
- java/src/json/ext/GeneratorState.java
|
178
|
+
- java/src/json/ext/OptionsReader.java
|
179
|
+
- java/src/json/ext/ParserService.java
|
86
180
|
- java/src/json/ext/Parser.rl
|
87
|
-
- java/src/json/ext/StringDecoder.java
|
88
|
-
- java/src/json/ext/GeneratorMethods.java
|
89
181
|
- java/src/json/ext/StringEncoder.java
|
90
|
-
- java/src/json/ext/Generator.java
|
91
182
|
- java/src/json/ext/GeneratorService.java
|
92
183
|
- java/src/json/ext/Utils.java
|
184
|
+
- java/src/json/ext/StringDecoder.java
|
185
|
+
- java/src/json/ext/Generator.java
|
93
186
|
- java/src/json/ext/ByteListTranscoder.java
|
94
|
-
- java/src/json/ext/
|
95
|
-
- java/src/json/ext/ParserService.java
|
96
|
-
- java/src/json/ext/OptionsReader.java
|
97
|
-
- java/src/json/ext/GeneratorState.java
|
98
|
-
- java/src/json/ext/Parser.java
|
187
|
+
- java/src/json/ext/GeneratorMethods.java
|
99
188
|
- java/lib/bytelist-1.0.6.jar
|
100
189
|
- java/lib/jcodings.jar
|
101
|
-
-
|
102
|
-
- lib/json.rb
|
103
|
-
- lib/json/json.xpm
|
104
|
-
- lib/json/Key.xpm
|
105
|
-
- lib/json/String.xpm
|
106
|
-
- lib/json/Numeric.xpm
|
107
|
-
- lib/json/Hash.xpm
|
108
|
-
- lib/json/add/rails.rb
|
109
|
-
- lib/json/add/core.rb
|
110
|
-
- lib/json/common.rb
|
111
|
-
- lib/json/Array.xpm
|
112
|
-
- lib/json/FalseClass.xpm
|
113
|
-
- lib/json/pure/generator.rb
|
114
|
-
- lib/json/pure/parser.rb
|
115
|
-
- lib/json/TrueClass.xpm
|
116
|
-
- lib/json/pure.rb
|
117
|
-
- lib/json/version.rb
|
118
|
-
- lib/json/ext.rb
|
119
|
-
- lib/json/editor.rb
|
120
|
-
- lib/json/NilClass.xpm
|
121
|
-
- data/example.json
|
122
|
-
- data/index.html
|
123
|
-
- data/prototype.js
|
124
|
-
- tests/test_json_encoding.rb
|
125
|
-
- tests/test_json_addition.rb
|
126
|
-
- tests/fixtures/pass16.json
|
127
|
-
- tests/fixtures/fail4.json
|
128
|
-
- tests/fixtures/fail1.json
|
129
|
-
- tests/fixtures/fail28.json
|
130
|
-
- tests/fixtures/fail8.json
|
131
|
-
- tests/fixtures/fail19.json
|
132
|
-
- tests/fixtures/pass2.json
|
133
|
-
- tests/fixtures/pass26.json
|
134
|
-
- tests/fixtures/pass1.json
|
135
|
-
- tests/fixtures/fail3.json
|
136
|
-
- tests/fixtures/fail20.json
|
137
|
-
- tests/fixtures/pass3.json
|
138
|
-
- tests/fixtures/pass15.json
|
139
|
-
- tests/fixtures/fail12.json
|
140
|
-
- tests/fixtures/fail13.json
|
141
|
-
- tests/fixtures/fail22.json
|
142
|
-
- tests/fixtures/fail24.json
|
143
|
-
- tests/fixtures/fail9.json
|
144
|
-
- tests/fixtures/fail2.json
|
145
|
-
- tests/fixtures/fail14.json
|
146
|
-
- tests/fixtures/fail6.json
|
147
|
-
- tests/fixtures/fail21.json
|
148
|
-
- tests/fixtures/fail7.json
|
149
|
-
- tests/fixtures/pass17.json
|
150
|
-
- tests/fixtures/fail11.json
|
151
|
-
- tests/fixtures/fail25.json
|
152
|
-
- tests/fixtures/fail5.json
|
153
|
-
- tests/fixtures/fail18.json
|
154
|
-
- tests/fixtures/fail27.json
|
155
|
-
- tests/fixtures/fail10.json
|
156
|
-
- tests/fixtures/fail23.json
|
157
|
-
- tests/test_json.rb
|
158
|
-
- tests/test_json_string_matching.rb
|
159
|
-
- tests/test_json_generate.rb
|
160
|
-
- tests/test_json_unicode.rb
|
161
|
-
- tests/setup_variant.rb
|
162
|
-
- tests/test_json_fixtures.rb
|
163
|
-
- COPYING
|
164
|
-
- json-java.gemspec
|
190
|
+
- README-json-jruby.markdown
|
165
191
|
- install.rb
|
166
|
-
-
|
167
|
-
-
|
168
|
-
-
|
192
|
+
- json-java.gemspec
|
193
|
+
- tools/fuzz.rb
|
194
|
+
- tools/server.rb
|
169
195
|
- ./tests/test_json_string_matching.rb
|
170
|
-
- ./tests/test_json_generate.rb
|
171
|
-
- ./tests/test_json_unicode.rb
|
172
196
|
- ./tests/test_json_fixtures.rb
|
173
|
-
|
197
|
+
- ./tests/test_json_unicode.rb
|
198
|
+
- ./tests/test_json_addition.rb
|
199
|
+
- ./tests/test_json_generate.rb
|
200
|
+
- ./tests/test_json_encoding.rb
|
201
|
+
- ./tests/test_json.rb
|
174
202
|
homepage: http://flori.github.com/json
|
175
203
|
licenses: []
|
176
204
|
|
@@ -179,7 +207,7 @@ rdoc_options:
|
|
179
207
|
- --title
|
180
208
|
- JSON implemention for ruby
|
181
209
|
- --main
|
182
|
-
- README
|
210
|
+
- README.rdoc
|
183
211
|
require_paths:
|
184
212
|
- lib
|
185
213
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -187,29 +215,25 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
187
215
|
requirements:
|
188
216
|
- - ">="
|
189
217
|
- !ruby/object:Gem::Version
|
190
|
-
segments:
|
191
|
-
- 0
|
192
218
|
version: "0"
|
193
219
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
194
220
|
none: false
|
195
221
|
requirements:
|
196
222
|
- - ">="
|
197
223
|
- !ruby/object:Gem::Version
|
198
|
-
segments:
|
199
|
-
- 0
|
200
224
|
version: "0"
|
201
225
|
requirements: []
|
202
226
|
|
203
227
|
rubyforge_project: json
|
204
|
-
rubygems_version: 1.
|
228
|
+
rubygems_version: 1.8.5
|
205
229
|
signing_key:
|
206
230
|
specification_version: 3
|
207
231
|
summary: JSON Implementation for Ruby
|
208
232
|
test_files:
|
209
|
-
- ./tests/test_json_encoding.rb
|
210
|
-
- ./tests/test_json_addition.rb
|
211
|
-
- ./tests/test_json.rb
|
212
233
|
- ./tests/test_json_string_matching.rb
|
213
|
-
- ./tests/test_json_generate.rb
|
214
|
-
- ./tests/test_json_unicode.rb
|
215
234
|
- ./tests/test_json_fixtures.rb
|
235
|
+
- ./tests/test_json_unicode.rb
|
236
|
+
- ./tests/test_json_addition.rb
|
237
|
+
- ./tests/test_json_generate.rb
|
238
|
+
- ./tests/test_json_encoding.rb
|
239
|
+
- ./tests/test_json.rb
|