json_pure 1.5.5 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. data/CHANGES +3 -7
  2. data/Gemfile +0 -4
  3. data/Rakefile +0 -7
  4. data/VERSION +1 -1
  5. data/ext/json/ext/parser/parser.c +18 -18
  6. data/ext/json/ext/parser/parser.rl +1 -4
  7. data/install.rb +1 -8
  8. data/java/src/json/ext/Parser.java +85 -81
  9. data/java/src/json/ext/Parser.rl +1 -1
  10. data/json.gemspec +5 -6
  11. data/json_pure.gemspec +4 -8
  12. data/lib/json/add/core.rb +9 -244
  13. data/lib/json/add/date.rb +34 -0
  14. data/lib/json/add/date_time.rb +50 -0
  15. data/lib/json/add/exception.rb +31 -0
  16. data/lib/json/add/range.rb +29 -0
  17. data/lib/json/add/regexp.rb +30 -0
  18. data/lib/json/add/struct.rb +30 -0
  19. data/lib/json/add/symbol.rb +25 -0
  20. data/lib/json/add/time.rb +35 -0
  21. data/lib/json/common.rb +5 -12
  22. data/lib/json/pure/parser.rb +4 -4
  23. data/lib/json/version.rb +1 -1
  24. data/tests/test_json.rb +2 -22
  25. data/tests/test_json_addition.rb +21 -29
  26. data/tests/test_json_string_matching.rb +6 -5
  27. data/tools/server.rb +1 -0
  28. metadata +125 -174
  29. data/0001-Security-fix-create_additons-JSON-GenericObject.patch +0 -448
  30. data/0001-Security-fix-create_additons-problem-1.5.5.patch +0 -630
  31. data/0001-Security-fix-for-create_additions-problem-1.6.8.patch +0 -685
  32. data/Gemfile.lock +0 -60
  33. data/bin/edit_json.rb +0 -9
  34. data/bin/prettify_json.rb +0 -48
  35. data/lib/json/Array.xpm +0 -21
  36. data/lib/json/FalseClass.xpm +0 -21
  37. data/lib/json/Hash.xpm +0 -21
  38. data/lib/json/Key.xpm +0 -73
  39. data/lib/json/NilClass.xpm +0 -21
  40. data/lib/json/Numeric.xpm +0 -28
  41. data/lib/json/String.xpm +0 -96
  42. data/lib/json/TrueClass.xpm +0 -21
  43. data/lib/json/editor.rb +0 -1369
  44. data/lib/json/json.xpm +0 -1499
@@ -0,0 +1,29 @@
1
+ unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
2
+ require 'json'
3
+ end
4
+
5
+ # Range serialization/deserialization
6
+ class Range
7
+
8
+ # Deserializes JSON string by constructing new Range object with arguments
9
+ # <tt>a</tt> serialized by <tt>to_json</tt>.
10
+ def self.json_create(object)
11
+ new(*object['a'])
12
+ end
13
+
14
+ # Returns a hash, that will be turned into a JSON object and represent this
15
+ # object.
16
+ def as_json(*)
17
+ {
18
+ JSON.create_id => self.class.name,
19
+ 'a' => [ first, last, exclude_end? ]
20
+ }
21
+ end
22
+
23
+ # Stores class name (Range) with JSON array of arguments <tt>a</tt> which
24
+ # include <tt>first</tt> (integer), <tt>last</tt> (integer), and
25
+ # <tt>exclude_end?</tt> (boolean) as JSON string.
26
+ def to_json(*args)
27
+ as_json.to_json(*args)
28
+ end
29
+ end
@@ -0,0 +1,30 @@
1
+ unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
2
+ require 'json'
3
+ end
4
+
5
+ # Regexp serialization/deserialization
6
+ class Regexp
7
+
8
+ # Deserializes JSON string by constructing new Regexp object with source
9
+ # <tt>s</tt> (Regexp or String) and options <tt>o</tt> serialized by
10
+ # <tt>to_json</tt>
11
+ def self.json_create(object)
12
+ new(object['s'], object['o'])
13
+ end
14
+
15
+ # Returns a hash, that will be turned into a JSON object and represent this
16
+ # object.
17
+ def as_json(*)
18
+ {
19
+ JSON.create_id => self.class.name,
20
+ 'o' => options,
21
+ 's' => source,
22
+ }
23
+ end
24
+
25
+ # Stores class name (Regexp) with options <tt>o</tt> and source <tt>s</tt>
26
+ # (Regexp or String) as JSON string
27
+ def to_json(*)
28
+ as_json.to_json
29
+ end
30
+ end
@@ -0,0 +1,30 @@
1
+ unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
2
+ require 'json'
3
+ end
4
+
5
+ # Struct serialization/deserialization
6
+ class Struct
7
+
8
+ # Deserializes JSON string by constructing new Struct object with values
9
+ # <tt>v</tt> serialized by <tt>to_json</tt>.
10
+ def self.json_create(object)
11
+ new(*object['v'])
12
+ end
13
+
14
+ # Returns a hash, that will be turned into a JSON object and represent this
15
+ # object.
16
+ def as_json(*)
17
+ klass = self.class.name
18
+ klass.to_s.empty? and raise JSON::JSONError, "Only named structs are supported!"
19
+ {
20
+ JSON.create_id => klass,
21
+ 'v' => values,
22
+ }
23
+ end
24
+
25
+ # Stores class name (Struct) with Struct values <tt>v</tt> as a JSON string.
26
+ # Only named structs are supported.
27
+ def to_json(*args)
28
+ as_json.to_json(*args)
29
+ end
30
+ end
@@ -0,0 +1,25 @@
1
+ unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
2
+ require 'json'
3
+ end
4
+
5
+ # Symbol serialization/deserialization
6
+ class Symbol
7
+ # Returns a hash, that will be turned into a JSON object and represent this
8
+ # object.
9
+ def as_json(*)
10
+ {
11
+ JSON.create_id => self.class.name,
12
+ 's' => to_s,
13
+ }
14
+ end
15
+
16
+ # Stores class name (Symbol) with String representation of Symbol as a JSON string.
17
+ def to_json(*a)
18
+ as_json.to_json(*a)
19
+ end
20
+
21
+ # Deserializes JSON string by converting the <tt>string</tt> value stored in the object to a Symbol
22
+ def self.json_create(o)
23
+ o['s'].to_sym
24
+ end
25
+ end
@@ -0,0 +1,35 @@
1
+ unless defined?(::JSON::JSON_LOADED) and ::JSON::JSON_LOADED
2
+ require 'json'
3
+ end
4
+
5
+ # Time serialization/deserialization
6
+ class Time
7
+
8
+ # Deserializes JSON string by converting time since epoch to Time
9
+ def self.json_create(object)
10
+ if usec = object.delete('u') # used to be tv_usec -> tv_nsec
11
+ object['n'] = usec * 1000
12
+ end
13
+ if respond_to?(:tv_nsec)
14
+ at(*object.values_at('s', 'n'))
15
+ else
16
+ at(object['s'], object['n'] / 1000)
17
+ end
18
+ end
19
+
20
+ # Returns a hash, that will be turned into a JSON object and represent this
21
+ # object.
22
+ def as_json(*)
23
+ {
24
+ JSON.create_id => self.class.name,
25
+ 's' => tv_sec,
26
+ 'n' => respond_to?(:tv_nsec) ? tv_nsec : tv_usec * 1000
27
+ }
28
+ end
29
+
30
+ # Stores class name (Time) with number of seconds since epoch and number of
31
+ # microseconds for Time as JSON string
32
+ def to_json(*args)
33
+ as_json.to_json(*args)
34
+ end
35
+ end
@@ -141,7 +141,7 @@ module JSON
141
141
  # the default.
142
142
  # * *create_additions*: If set to false, the Parser doesn't create
143
143
  # additions even if a matching class and create_id was found. This option
144
- # defaults to false.
144
+ # defaults to true.
145
145
  # * *object_class*: Defaults to Hash
146
146
  # * *array_class*: Defaults to Array
147
147
  def parse(source, opts = {})
@@ -162,7 +162,7 @@ module JSON
162
162
  # to true.
163
163
  # * *create_additions*: If set to false, the Parser doesn't create
164
164
  # additions even if a matching class and create_id was found. This option
165
- # defaults to false.
165
+ # defaults to true.
166
166
  def parse!(source, opts = {})
167
167
  opts = {
168
168
  :max_nesting => false,
@@ -287,18 +287,11 @@ module JSON
287
287
  # Load a ruby data structure from a JSON _source_ and return it. A source can
288
288
  # either be a string-like object, an IO-like object, or an object responding
289
289
  # to the read method. If _proc_ was given, it will be called with any nested
290
- # Ruby object as an argument recursively in depth first order. To modify the
291
- # default options pass in the optional _options_ argument as well.
290
+ # Ruby object as an argument recursively in depth first order.
292
291
  #
293
292
  # This method is part of the implementation of the load/dump interface of
294
293
  # Marshal and YAML.
295
- def load(source, proc = nil, options = {})
296
- load_default_options = {
297
- :max_nesting => false,
298
- :allow_nan => true,
299
- :create_additions => false
300
- }
301
- opts = load_default_options.merge options
294
+ def load(source, proc = nil)
302
295
  if source.respond_to? :to_str
303
296
  source = source.to_str
304
297
  elsif source.respond_to? :to_io
@@ -306,7 +299,7 @@ module JSON
306
299
  else
307
300
  source = source.read
308
301
  end
309
- result = parse(source, opts)
302
+ result = parse(source, :max_nesting => false, :allow_nan => true)
310
303
  recurse_proc(result, &proc) if proc
311
304
  result
312
305
  end
@@ -63,9 +63,9 @@ module JSON
63
63
  # * *symbolize_names*: If set to true, returns symbols for the names
64
64
  # (keys) in a JSON object. Otherwise strings are returned, which is also
65
65
  # the default.
66
- # * *create_additions*: If set to true, the Parser creates
67
- # additions when if a matching class and create_id was found. This
68
- # option defaults to false.
66
+ # * *create_additions*: If set to false, the Parser doesn't create
67
+ # additions even if a matchin class and create_id was found. This option
68
+ # defaults to true.
69
69
  # * *object_class*: Defaults to Hash
70
70
  # * *array_class*: Defaults to Array
71
71
  # * *quirks_mode*: Enables quirks_mode for parser, that is for example
@@ -88,7 +88,7 @@ module JSON
88
88
  if opts.key?(:create_additions)
89
89
  @create_additions = !!opts[:create_additions]
90
90
  else
91
- @create_additions = false
91
+ @create_additions = true
92
92
  end
93
93
  @create_id = @create_additions ? JSON.create_id : nil
94
94
  @object_class = opts[:object_class] || Hash
@@ -1,6 +1,6 @@
1
1
  module JSON
2
2
  # JSON version
3
- VERSION = '1.5.5'
3
+ VERSION = '1.6.0'
4
4
  VERSION_ARRAY = VERSION.split(/\./).map { |x| x.to_i } # :nodoc:
5
5
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
6
6
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
@@ -4,7 +4,6 @@
4
4
  require 'test/unit'
5
5
  require File.join(File.dirname(__FILE__), 'setup_variant')
6
6
  require 'stringio'
7
- require 'tempfile'
8
7
 
9
8
  unless Array.method_defined?(:permutation)
10
9
  begin
@@ -264,12 +263,12 @@ class TC_JSON < Test::Unit::TestCase
264
263
  def test_generation_of_core_subclasses_with_new_to_json
265
264
  obj = SubHash2["foo" => SubHash2["bar" => true]]
266
265
  obj_json = JSON(obj)
267
- obj_again = JSON.parse(obj_json, :create_additions => true)
266
+ obj_again = JSON(obj_json)
268
267
  assert_kind_of SubHash2, obj_again
269
268
  assert_kind_of SubHash2, obj_again['foo']
270
269
  assert obj_again['foo']['bar']
271
270
  assert_equal obj, obj_again
272
- assert_equal ["foo"], JSON(JSON(SubArray2["foo"]), :create_additions => true)
271
+ assert_equal ["foo"], JSON(JSON(SubArray2["foo"]))
273
272
  end
274
273
 
275
274
  def test_generation_of_core_subclasses_with_default_to_json
@@ -415,25 +414,6 @@ EOT
415
414
  JSON.parse('{"foo":"bar", "baz":"quux"}', :symbolize_names => true))
416
415
  end
417
416
 
418
- def test_load
419
- assert_equal @hash, JSON.load(@json)
420
- tempfile = Tempfile.open('json')
421
- tempfile.write @json
422
- tempfile.rewind
423
- assert_equal @hash, JSON.load(tempfile)
424
- stringio = StringIO.new(@json)
425
- stringio.rewind
426
- assert_equal @hash, JSON.load(stringio)
427
- assert_raise(NoMethodError) { JSON.load(nil) }
428
- assert_raise(JSON::ParserError) {JSON.load('') }
429
- end
430
-
431
- def test_load_with_options
432
- small_hash = JSON("foo" => 'bar')
433
- symbol_hash = { :foo => 'bar' }
434
- assert_equal symbol_hash, JSON.load(small_hash, nil, :symbolize_names => true)
435
- end
436
-
437
417
  def test_load_dump
438
418
  too_deep = '[[[[[[[[[[[[[[[[[[[[]]]]]]]]]]]]]]]]]]]]'
439
419
  assert_equal too_deep, JSON.dump(eval(too_deep))
@@ -71,19 +71,11 @@ class TC_JSONAddition < Test::Unit::TestCase
71
71
  a = A.new(666)
72
72
  assert A.json_creatable?
73
73
  json = generate(a)
74
- a_again = JSON.parse(json, :create_additions => true)
74
+ a_again = JSON.parse(json)
75
75
  assert_kind_of a.class, a_again
76
76
  assert_equal a, a_again
77
77
  end
78
78
 
79
- def test_extended_json_default
80
- a = A.new(666)
81
- assert A.json_creatable?
82
- json = generate(a)
83
- a_hash = JSON.parse(json)
84
- assert_kind_of Hash, a_hash
85
- end
86
-
87
79
  def test_extended_json_disabled
88
80
  a = A.new(666)
89
81
  assert A.json_creatable?
@@ -110,7 +102,7 @@ class TC_JSONAddition < Test::Unit::TestCase
110
102
  c = C.new
111
103
  assert !C.json_creatable?
112
104
  json = generate(c)
113
- assert_raises(ArgumentError, NameError) { JSON.parse(json, :create_additions => true) }
105
+ assert_raises(ArgumentError, NameError) { JSON.parse(json) }
114
106
  end
115
107
 
116
108
  def test_raw_strings
@@ -128,7 +120,7 @@ class TC_JSONAddition < Test::Unit::TestCase
128
120
  assert_match(/\A\{.*\}\Z/, json)
129
121
  assert_match(/"json_class":"String"/, json)
130
122
  assert_match(/"raw":\[0,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,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255\]/, json)
131
- raw_again = JSON.parse(json, :create_additions => true)
123
+ raw_again = JSON.parse(json)
132
124
  assert_equal raw, raw_again
133
125
  end
134
126
 
@@ -136,17 +128,17 @@ class TC_JSONAddition < Test::Unit::TestCase
136
128
 
137
129
  def test_core
138
130
  t = Time.now
139
- assert_equal t, JSON(JSON(t), :create_additions => true)
131
+ assert_equal t.inspect, JSON(JSON(t)).inspect
140
132
  d = Date.today
141
- assert_equal d, JSON(JSON(d), :create_additions => true)
133
+ assert_equal d, JSON(JSON(d))
142
134
  d = DateTime.civil(2007, 6, 14, 14, 57, 10, Rational(1, 12), 2299161)
143
- assert_equal d, JSON(JSON(d), :create_additions => true)
144
- assert_equal 1..10, JSON(JSON(1..10), :create_additions => true)
145
- assert_equal 1...10, JSON(JSON(1...10), :create_additions => true)
146
- assert_equal "a".."c", JSON(JSON("a".."c"), :create_additions => true)
147
- assert_equal "a"..."c", JSON(JSON("a"..."c"), :create_additions => true)
135
+ assert_equal d, JSON(JSON(d))
136
+ assert_equal 1..10, JSON(JSON(1..10))
137
+ assert_equal 1...10, JSON(JSON(1...10))
138
+ assert_equal "a".."c", JSON(JSON("a".."c"))
139
+ assert_equal "a"..."c", JSON(JSON("a"..."c"))
148
140
  s = MyJsonStruct.new 4711, 'foot'
149
- assert_equal s, JSON(JSON(s), :create_additions => true)
141
+ assert_equal s, JSON(JSON(s))
150
142
  struct = Struct.new :foo, :bar
151
143
  s = struct.new 4711, 'foot'
152
144
  assert_raises(JSONError) { JSON(s) }
@@ -154,29 +146,29 @@ class TC_JSONAddition < Test::Unit::TestCase
154
146
  raise TypeError, "test me"
155
147
  rescue TypeError => e
156
148
  e_json = JSON.generate e
157
- e_again = JSON e_json, :create_additions => true
149
+ e_again = JSON e_json
158
150
  assert_kind_of TypeError, e_again
159
151
  assert_equal e.message, e_again.message
160
152
  assert_equal e.backtrace, e_again.backtrace
161
153
  end
162
- assert_equal(/foo/, JSON(JSON(/foo/), :create_additions => true))
163
- assert_equal(/foo/i, JSON(JSON(/foo/i), :create_additions => true))
154
+ assert_equal(/foo/, JSON(JSON(/foo/)))
155
+ assert_equal(/foo/i, JSON(JSON(/foo/i)))
164
156
  end
165
157
 
166
158
  def test_utc_datetime
167
159
  now = Time.now
168
- d = DateTime.parse(now.to_s, :create_additions => true) # usual case
169
- assert_equal d, JSON.parse(d.to_json, :create_additions => true)
160
+ d = DateTime.parse(now.to_s) # usual case
161
+ assert_equal d, JSON.parse(d.to_json)
170
162
  d = DateTime.parse(now.utc.to_s) # of = 0
171
- assert_equal d, JSON.parse(d.to_json, :create_additions => true)
163
+ assert_equal d, JSON.parse(d.to_json)
172
164
  d = DateTime.civil(2008, 6, 17, 11, 48, 32, Rational(1,24))
173
- assert_equal d, JSON.parse(d.to_json, :create_additions => true)
165
+ assert_equal d, JSON.parse(d.to_json)
174
166
  d = DateTime.civil(2008, 6, 17, 11, 48, 32, Rational(12,24))
175
- assert_equal d, JSON.parse(d.to_json, :create_additions => true)
167
+ assert_equal d, JSON.parse(d.to_json)
176
168
  end
177
169
 
178
170
  def test_rational_complex
179
- assert_equal Rational(2, 9), JSON.parse(JSON(Rational(2, 9)), :create_additions => true)
180
- assert_equal Complex(2, 9), JSON.parse(JSON(Complex(2, 9)), :create_additions => true)
171
+ assert_equal Rational(2, 9), JSON(JSON(Rational(2, 9)))
172
+ assert_equal Complex(2, 9), JSON(JSON(Complex(2, 9)))
181
173
  end
182
174
  end
@@ -27,13 +27,14 @@ class TestJsonStringMatching < Test::Unit::TestCase
27
27
  t = TestTime.new
28
28
  t_json = [ t ].to_json
29
29
  assert_equal [ t ],
30
- JSON.parse(t_json, :create_additions => true,
31
- :match_string => { /\A\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}[+-]\d{4}\z/ => TestTime })
30
+ JSON.parse(t_json,
31
+ :match_string => { /\A\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}[+-]\d{4}\Z/ => TestTime })
32
32
  assert_equal [ t.strftime('%FT%T%z') ],
33
- JSON.parse(t_json, :create_additions => true,
34
- :match_string => { /\A\d{3}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}[+-]\d{4}\z/ => TestTime })
33
+ JSON.parse(t_json,
34
+ :match_string => { /\A\d{3}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}[+-]\d{4}\Z/ => TestTime })
35
35
  assert_equal [ t.strftime('%FT%T%z') ],
36
36
  JSON.parse(t_json,
37
- :match_string => { /\A\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}[+-]\d{4}\z/ => TestTime })
37
+ :match_string => { /\A\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}[+-]\d{4}\Z/ => TestTime },
38
+ :create_additions => false)
38
39
  end
39
40
  end
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # encoding: utf-8
2
3
 
3
4
  require 'webrick'
4
5
  include WEBrick
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json_pure
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.5
4
+ version: 1.6.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-10 00:00:00.000000000 Z
12
+ date: 2011-09-12 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: permutation
16
- requirement: !ruby/object:Gem::Requirement
16
+ requirement: &2151768700 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,15 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ! '>='
28
- - !ruby/object:Gem::Version
29
- version: '0'
24
+ version_requirements: *2151768700
30
25
  - !ruby/object:Gem::Dependency
31
26
  name: bullshit
32
- requirement: !ruby/object:Gem::Requirement
27
+ requirement: &2151767980 !ruby/object:Gem::Requirement
33
28
  none: false
34
29
  requirements:
35
30
  - - ! '>='
@@ -37,15 +32,10 @@ dependencies:
37
32
  version: '0'
38
33
  type: :development
39
34
  prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ! '>='
44
- - !ruby/object:Gem::Version
45
- version: '0'
35
+ version_requirements: *2151767980
46
36
  - !ruby/object:Gem::Dependency
47
37
  name: sdoc
48
- requirement: !ruby/object:Gem::Requirement
38
+ requirement: &2151766980 !ruby/object:Gem::Requirement
49
39
  none: false
50
40
  requirements:
51
41
  - - ! '>='
@@ -53,15 +43,10 @@ dependencies:
53
43
  version: '0'
54
44
  type: :development
55
45
  prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
- requirements:
59
- - - ! '>='
60
- - !ruby/object:Gem::Version
61
- version: '0'
46
+ version_requirements: *2151766980
62
47
  - !ruby/object:Gem::Dependency
63
48
  name: rake
64
- requirement: !ruby/object:Gem::Requirement
49
+ requirement: &2151765940 !ruby/object:Gem::Requirement
65
50
  none: false
66
51
  requirements:
67
52
  - - ~>
@@ -69,178 +54,147 @@ dependencies:
69
54
  version: 0.9.2
70
55
  type: :development
71
56
  prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
- requirements:
75
- - - ~>
76
- - !ruby/object:Gem::Version
77
- version: 0.9.2
78
- - !ruby/object:Gem::Dependency
79
- name: spruz
80
- requirement: !ruby/object:Gem::Requirement
81
- none: false
82
- requirements:
83
- - - ~>
84
- - !ruby/object:Gem::Version
85
- version: 0.2.8
86
- type: :runtime
87
- prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
- requirements:
91
- - - ~>
92
- - !ruby/object:Gem::Version
93
- version: 0.2.8
57
+ version_requirements: *2151765940
94
58
  description: This is a JSON implementation in pure Ruby.
95
59
  email: flori@ping.de
96
- executables:
97
- - edit_json.rb
98
- - prettify_json.rb
60
+ executables: []
99
61
  extensions: []
100
62
  extra_rdoc_files:
101
63
  - README.rdoc
102
64
  files:
103
- - 0001-Security-fix-create_additons-JSON-GenericObject.patch
104
- - 0001-Security-fix-create_additons-problem-1.5.5.patch
105
- - 0001-Security-fix-for-create_additions-problem-1.6.8.patch
106
- - CHANGES
65
+ - tests/test_json_string_matching.rb
66
+ - tests/test_json_fixtures.rb
67
+ - tests/setup_variant.rb
68
+ - tests/fixtures/fail6.json
69
+ - tests/fixtures/fail9.json
70
+ - tests/fixtures/fail10.json
71
+ - tests/fixtures/fail24.json
72
+ - tests/fixtures/fail28.json
73
+ - tests/fixtures/fail13.json
74
+ - tests/fixtures/fail4.json
75
+ - tests/fixtures/pass3.json
76
+ - tests/fixtures/fail11.json
77
+ - tests/fixtures/fail14.json
78
+ - tests/fixtures/fail3.json
79
+ - tests/fixtures/fail12.json
80
+ - tests/fixtures/pass16.json
81
+ - tests/fixtures/pass15.json
82
+ - tests/fixtures/fail20.json
83
+ - tests/fixtures/fail8.json
84
+ - tests/fixtures/pass2.json
85
+ - tests/fixtures/fail5.json
86
+ - tests/fixtures/fail1.json
87
+ - tests/fixtures/fail25.json
88
+ - tests/fixtures/pass17.json
89
+ - tests/fixtures/fail7.json
90
+ - tests/fixtures/pass26.json
91
+ - tests/fixtures/fail21.json
92
+ - tests/fixtures/pass1.json
93
+ - tests/fixtures/fail23.json
94
+ - tests/fixtures/fail18.json
95
+ - tests/fixtures/fail2.json
96
+ - tests/fixtures/fail22.json
97
+ - tests/fixtures/fail27.json
98
+ - tests/fixtures/fail19.json
99
+ - tests/test_json_unicode.rb
100
+ - tests/test_json_addition.rb
101
+ - tests/test_json_generate.rb
102
+ - tests/test_json_encoding.rb
103
+ - tests/test_json.rb
107
104
  - COPYING
108
- - COPYING-json-jruby
109
- - GPL
110
- - Gemfile
111
- - Gemfile.lock
112
- - README-json-jruby.markdown
113
- - README.rdoc
114
- - Rakefile
115
105
  - TODO
116
- - VERSION
117
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkComparison.log
118
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_fast-autocorrelation.dat
119
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_fast.dat
120
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_pretty-autocorrelation.dat
121
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_pretty.dat
122
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_safe-autocorrelation.dat
123
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_safe.dat
124
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt.log
125
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_fast-autocorrelation.dat
126
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_fast.dat
127
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_pretty-autocorrelation.dat
128
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_pretty.dat
129
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_safe-autocorrelation.dat
106
+ - Rakefile
107
+ - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt#parser.dat
108
+ - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure.log
109
+ - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML.log
110
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails.log
111
+ - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails.log
130
112
  - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_safe.dat
131
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure.log
132
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails#generator-autocorrelation.dat
113
+ - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML#parser.dat
133
114
  - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails#generator.dat
134
- - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails.log
135
- - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkComparison.log
136
- - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt#parser-autocorrelation.dat
137
- - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt#parser.dat
138
- - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt.log
115
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure.log
116
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_pretty-autocorrelation.dat
139
117
  - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure#parser-autocorrelation.dat
118
+ - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt#parser-autocorrelation.dat
140
119
  - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure#parser.dat
141
- - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure.log
142
120
  - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails#parser-autocorrelation.dat
121
+ - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt.log
122
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_fast.dat
123
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_safe.dat
124
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_pretty.dat
125
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkComparison.log
143
126
  - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails#parser.dat
144
- - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails.log
127
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt.log
128
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_safe-autocorrelation.dat
129
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails#generator-autocorrelation.dat
130
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_fast-autocorrelation.dat
131
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_pretty.dat
132
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_fast-autocorrelation.dat
133
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_fast.dat
134
+ - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkComparison.log
135
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_pretty-autocorrelation.dat
145
136
  - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML#parser-autocorrelation.dat
146
- - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML#parser.dat
147
- - benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML.log
137
+ - benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_safe-autocorrelation.dat
138
+ - benchmarks/parser2_benchmark.rb
139
+ - benchmarks/parser_benchmark.rb
148
140
  - benchmarks/generator2_benchmark.rb
149
141
  - benchmarks/generator_benchmark.rb
150
- - benchmarks/ohai.json
151
142
  - benchmarks/ohai.ruby
152
- - benchmarks/parser2_benchmark.rb
153
- - benchmarks/parser_benchmark.rb
154
- - bin/edit_json.rb
155
- - bin/prettify_json.rb
156
- - data/example.json
157
- - data/index.html
158
- - data/prototype.js
159
- - ext/json/ext/generator/extconf.rb
160
- - ext/json/ext/generator/generator.c
161
- - ext/json/ext/generator/generator.h
162
- - ext/json/ext/parser/extconf.rb
163
- - ext/json/ext/parser/parser.c
143
+ - benchmarks/ohai.json
144
+ - lib/json/version.rb
145
+ - lib/json/add/symbol.rb
146
+ - lib/json/add/struct.rb
147
+ - lib/json/add/complex.rb
148
+ - lib/json/add/rational.rb
149
+ - lib/json/add/exception.rb
150
+ - lib/json/add/time.rb
151
+ - lib/json/add/date_time.rb
152
+ - lib/json/add/core.rb
153
+ - lib/json/add/range.rb
154
+ - lib/json/add/date.rb
155
+ - lib/json/add/regexp.rb
156
+ - lib/json/common.rb
157
+ - lib/json/pure/generator.rb
158
+ - lib/json/pure/parser.rb
159
+ - lib/json/ext.rb
160
+ - lib/json/pure.rb
161
+ - lib/json.rb
162
+ - Gemfile
163
+ - README.rdoc
164
+ - json_pure.gemspec
165
+ - GPL
166
+ - CHANGES
167
+ - COPYING-json-jruby
164
168
  - ext/json/ext/parser/parser.h
169
+ - ext/json/ext/parser/extconf.rb
165
170
  - ext/json/ext/parser/parser.rl
166
- - install.rb
167
- - java/lib/bytelist-1.0.6.jar
168
- - java/lib/jcodings.jar
169
- - java/src/json/ext/ByteListTranscoder.java
170
- - java/src/json/ext/Generator.java
171
- - java/src/json/ext/GeneratorMethods.java
172
- - java/src/json/ext/GeneratorService.java
171
+ - ext/json/ext/parser/parser.c
172
+ - ext/json/ext/generator/generator.c
173
+ - ext/json/ext/generator/extconf.rb
174
+ - ext/json/ext/generator/generator.h
175
+ - VERSION
176
+ - data/prototype.js
177
+ - data/index.html
178
+ - data/example.json
179
+ - json.gemspec
180
+ - java/src/json/ext/Parser.java
181
+ - java/src/json/ext/RuntimeInfo.java
173
182
  - java/src/json/ext/GeneratorState.java
174
183
  - java/src/json/ext/OptionsReader.java
175
- - java/src/json/ext/Parser.java
176
- - java/src/json/ext/Parser.rl
177
184
  - java/src/json/ext/ParserService.java
178
- - java/src/json/ext/RuntimeInfo.java
179
- - java/src/json/ext/StringDecoder.java
185
+ - java/src/json/ext/Parser.rl
180
186
  - java/src/json/ext/StringEncoder.java
187
+ - java/src/json/ext/GeneratorService.java
181
188
  - java/src/json/ext/Utils.java
189
+ - java/src/json/ext/StringDecoder.java
190
+ - java/src/json/ext/Generator.java
191
+ - java/src/json/ext/ByteListTranscoder.java
192
+ - java/src/json/ext/GeneratorMethods.java
193
+ - java/lib/bytelist-1.0.6.jar
194
+ - java/lib/jcodings.jar
195
+ - README-json-jruby.markdown
196
+ - install.rb
182
197
  - json-java.gemspec
183
- - json.gemspec
184
- - json_pure.gemspec
185
- - lib/json.rb
186
- - lib/json/Array.xpm
187
- - lib/json/FalseClass.xpm
188
- - lib/json/Hash.xpm
189
- - lib/json/Key.xpm
190
- - lib/json/NilClass.xpm
191
- - lib/json/Numeric.xpm
192
- - lib/json/String.xpm
193
- - lib/json/TrueClass.xpm
194
- - lib/json/add/complex.rb
195
- - lib/json/add/core.rb
196
- - lib/json/add/rational.rb
197
- - lib/json/common.rb
198
- - lib/json/editor.rb
199
- - lib/json/ext.rb
200
- - lib/json/json.xpm
201
- - lib/json/pure.rb
202
- - lib/json/pure/generator.rb
203
- - lib/json/pure/parser.rb
204
- - lib/json/version.rb
205
- - tests/fixtures/fail1.json
206
- - tests/fixtures/fail10.json
207
- - tests/fixtures/fail11.json
208
- - tests/fixtures/fail12.json
209
- - tests/fixtures/fail13.json
210
- - tests/fixtures/fail14.json
211
- - tests/fixtures/fail18.json
212
- - tests/fixtures/fail19.json
213
- - tests/fixtures/fail2.json
214
- - tests/fixtures/fail20.json
215
- - tests/fixtures/fail21.json
216
- - tests/fixtures/fail22.json
217
- - tests/fixtures/fail23.json
218
- - tests/fixtures/fail24.json
219
- - tests/fixtures/fail25.json
220
- - tests/fixtures/fail27.json
221
- - tests/fixtures/fail28.json
222
- - tests/fixtures/fail3.json
223
- - tests/fixtures/fail4.json
224
- - tests/fixtures/fail5.json
225
- - tests/fixtures/fail6.json
226
- - tests/fixtures/fail7.json
227
- - tests/fixtures/fail8.json
228
- - tests/fixtures/fail9.json
229
- - tests/fixtures/pass1.json
230
- - tests/fixtures/pass15.json
231
- - tests/fixtures/pass16.json
232
- - tests/fixtures/pass17.json
233
- - tests/fixtures/pass2.json
234
- - tests/fixtures/pass26.json
235
- - tests/fixtures/pass3.json
236
- - tests/setup_variant.rb
237
- - tests/test_json.rb
238
- - tests/test_json_addition.rb
239
- - tests/test_json_encoding.rb
240
- - tests/test_json_fixtures.rb
241
- - tests/test_json_generate.rb
242
- - tests/test_json_string_matching.rb
243
- - tests/test_json_unicode.rb
244
198
  - tools/fuzz.rb
245
199
  - tools/server.rb
246
200
  - ./tests/test_json_string_matching.rb
@@ -266,9 +220,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
266
220
  - - ! '>='
267
221
  - !ruby/object:Gem::Version
268
222
  version: '0'
269
- segments:
270
- - 0
271
- hash: -399171405044678908
272
223
  required_rubygems_version: !ruby/object:Gem::Requirement
273
224
  none: false
274
225
  requirements:
@@ -277,7 +228,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
277
228
  version: '0'
278
229
  requirements: []
279
230
  rubyforge_project: json
280
- rubygems_version: 1.8.25
231
+ rubygems_version: 1.8.10
281
232
  signing_key:
282
233
  specification_version: 3
283
234
  summary: JSON Implementation for Ruby