json_pure 2.3.0 → 2.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -0
- data/CHANGES.md +33 -0
- data/README.md +16 -0
- data/Rakefile +8 -87
- data/VERSION +1 -1
- data/ext/json/ext/generator/generator.c +71 -1
- data/ext/json/ext/parser/parser.c +71 -70
- data/ext/json/ext/parser/parser.rl +1 -0
- data/json-java.gemspec +3 -3
- data/json.gemspec +0 -0
- data/json_pure.gemspec +8 -13
- data/lib/json.rb +378 -29
- data/lib/json/common.rb +324 -89
- data/lib/json/pure/generator.rb +1 -1
- data/lib/json/pure/parser.rb +2 -2
- data/lib/json/version.rb +1 -1
- data/tests/json_fixtures_test.rb +6 -1
- metadata +14 -8
data/lib/json/pure/generator.rb
CHANGED
@@ -405,7 +405,7 @@ module JSON
|
|
405
405
|
end
|
406
406
|
end
|
407
407
|
|
408
|
-
# Module that holds the
|
408
|
+
# Module that holds the extending methods if, the String module is
|
409
409
|
# included.
|
410
410
|
module Extend
|
411
411
|
# Raw Strings are JSON Objects (the raw bytes are stored in an
|
data/lib/json/pure/parser.rb
CHANGED
@@ -49,7 +49,7 @@ module JSON
|
|
49
49
|
)+
|
50
50
|
)mx
|
51
51
|
|
52
|
-
|
52
|
+
UNPARSED = Object.new.freeze
|
53
53
|
|
54
54
|
# Creates a new JSON::Pure::Parser instance for the string _source_.
|
55
55
|
#
|
@@ -66,7 +66,7 @@ module JSON
|
|
66
66
|
# also the default. It's not possible to use this option in
|
67
67
|
# conjunction with the *create_additions* option.
|
68
68
|
# * *create_additions*: If set to true, the Parser creates
|
69
|
-
# additions when
|
69
|
+
# additions when a matching class and create_id are found. This
|
70
70
|
# option defaults to false.
|
71
71
|
# * *object_class*: Defaults to Hash
|
72
72
|
# * *array_class*: Defaults to Array
|
data/lib/json/version.rb
CHANGED
data/tests/json_fixtures_test.rb
CHANGED
@@ -3,7 +3,7 @@ require 'test_helper'
|
|
3
3
|
|
4
4
|
class JSONFixturesTest < Test::Unit::TestCase
|
5
5
|
def setup
|
6
|
-
fixtures = File.join(File.dirname(__FILE__), 'fixtures/{fail,pass}
|
6
|
+
fixtures = File.join(File.dirname(__FILE__), 'fixtures/{fail,pass}*.json')
|
7
7
|
passed, failed = Dir[fixtures].partition { |f| f['pass'] }
|
8
8
|
@passed = passed.inject([]) { |a, f| a << [ f, File.read(f) ] }.sort
|
9
9
|
@failed = failed.inject([]) { |a, f| a << [ f, File.read(f) ] }.sort
|
@@ -29,4 +29,9 @@ class JSONFixturesTest < Test::Unit::TestCase
|
|
29
29
|
end
|
30
30
|
end
|
31
31
|
end
|
32
|
+
|
33
|
+
def test_sanity
|
34
|
+
assert(@passed.size > 5)
|
35
|
+
assert(@failed.size > 20)
|
36
|
+
end
|
32
37
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: json_pure
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florian Frank
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-06-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -28,16 +28,22 @@ dependencies:
|
|
28
28
|
name: test-unit
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '2.0'
|
34
|
+
- - "<"
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '4.0'
|
34
37
|
type: :development
|
35
38
|
prerelease: false
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
37
40
|
requirements:
|
38
|
-
- - "
|
41
|
+
- - ">="
|
39
42
|
- !ruby/object:Gem::Version
|
40
43
|
version: '2.0'
|
44
|
+
- - "<"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '4.0'
|
41
47
|
description: This is a JSON implementation in pure Ruby.
|
42
48
|
email: flori@ping.de
|
43
49
|
executables: []
|
@@ -156,7 +162,7 @@ homepage: http://flori.github.com/json
|
|
156
162
|
licenses:
|
157
163
|
- Ruby
|
158
164
|
metadata: {}
|
159
|
-
post_install_message:
|
165
|
+
post_install_message:
|
160
166
|
rdoc_options:
|
161
167
|
- "--title"
|
162
168
|
- JSON implemention for ruby
|
@@ -168,7 +174,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
168
174
|
requirements:
|
169
175
|
- - ">="
|
170
176
|
- !ruby/object:Gem::Version
|
171
|
-
version: '
|
177
|
+
version: '2.0'
|
172
178
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
173
179
|
requirements:
|
174
180
|
- - ">="
|
@@ -176,7 +182,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
176
182
|
version: '0'
|
177
183
|
requirements: []
|
178
184
|
rubygems_version: 3.1.2
|
179
|
-
signing_key:
|
185
|
+
signing_key:
|
180
186
|
specification_version: 4
|
181
187
|
summary: JSON Implementation for Ruby
|
182
188
|
test_files:
|