json 2.3.0 → 2.3.1
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.
- 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 +23 -13
- data/LICENSE +0 -56
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
|
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 as a Ruby extension in C.
|
42
48
|
email: flori@ping.de
|
43
49
|
executables: []
|
@@ -48,12 +54,10 @@ extensions:
|
|
48
54
|
extra_rdoc_files:
|
49
55
|
- README.md
|
50
56
|
files:
|
51
|
-
- "./tests/test_helper.rb"
|
52
57
|
- ".gitignore"
|
53
58
|
- ".travis.yml"
|
54
59
|
- CHANGES.md
|
55
60
|
- Gemfile
|
56
|
-
- LICENSE
|
57
61
|
- README-json-jruby.md
|
58
62
|
- README.md
|
59
63
|
- Rakefile
|
@@ -158,8 +162,14 @@ files:
|
|
158
162
|
homepage: http://flori.github.com/json
|
159
163
|
licenses:
|
160
164
|
- Ruby
|
161
|
-
metadata:
|
162
|
-
|
165
|
+
metadata:
|
166
|
+
bug_tracker_uri: https://github.com/flori/json/issues
|
167
|
+
changelog_uri: https://github.com/flori/json/blob/master/CHANGES.md
|
168
|
+
documentation_uri: http://flori.github.io/json/doc/index.html
|
169
|
+
homepage_uri: http://flori.github.io/json/
|
170
|
+
source_code_uri: https://github.com/flori/json
|
171
|
+
wiki_uri: https://github.com/flori/json/wiki
|
172
|
+
post_install_message:
|
163
173
|
rdoc_options:
|
164
174
|
- "--title"
|
165
175
|
- JSON implemention for Ruby
|
@@ -171,16 +181,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
171
181
|
requirements:
|
172
182
|
- - ">="
|
173
183
|
- !ruby/object:Gem::Version
|
174
|
-
version: '
|
184
|
+
version: '2.0'
|
175
185
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
176
186
|
requirements:
|
177
187
|
- - ">="
|
178
188
|
- !ruby/object:Gem::Version
|
179
189
|
version: '0'
|
180
190
|
requirements: []
|
181
|
-
rubygems_version: 3.
|
182
|
-
signing_key:
|
191
|
+
rubygems_version: 3.1.2
|
192
|
+
signing_key:
|
183
193
|
specification_version: 4
|
184
194
|
summary: JSON Implementation for Ruby
|
185
195
|
test_files:
|
186
|
-
-
|
196
|
+
- tests/test_helper.rb
|
data/LICENSE
DELETED
@@ -1,56 +0,0 @@
|
|
1
|
-
Ruby is copyrighted free software by Yukihiro Matsumoto <matz@netlab.jp>.
|
2
|
-
You can redistribute it and/or modify it under either the terms of the
|
3
|
-
2-clause BSDL (see the file BSDL), or the conditions below:
|
4
|
-
|
5
|
-
1. You may make and give away verbatim copies of the source form of the
|
6
|
-
software without restriction, provided that you duplicate all of the
|
7
|
-
original copyright notices and associated disclaimers.
|
8
|
-
|
9
|
-
2. You may modify your copy of the software in any way, provided that
|
10
|
-
you do at least ONE of the following:
|
11
|
-
|
12
|
-
a) place your modifications in the Public Domain or otherwise
|
13
|
-
make them Freely Available, such as by posting said
|
14
|
-
modifications to Usenet or an equivalent medium, or by allowing
|
15
|
-
the author to include your modifications in the software.
|
16
|
-
|
17
|
-
b) use the modified software only within your corporation or
|
18
|
-
organization.
|
19
|
-
|
20
|
-
c) give non-standard binaries non-standard names, with
|
21
|
-
instructions on where to get the original software distribution.
|
22
|
-
|
23
|
-
d) make other distribution arrangements with the author.
|
24
|
-
|
25
|
-
3. You may distribute the software in object code or binary form,
|
26
|
-
provided that you do at least ONE of the following:
|
27
|
-
|
28
|
-
a) distribute the binaries and library files of the software,
|
29
|
-
together with instructions (in the manual page or equivalent)
|
30
|
-
on where to get the original distribution.
|
31
|
-
|
32
|
-
b) accompany the distribution with the machine-readable source of
|
33
|
-
the software.
|
34
|
-
|
35
|
-
c) give non-standard binaries non-standard names, with
|
36
|
-
instructions on where to get the original software distribution.
|
37
|
-
|
38
|
-
d) make other distribution arrangements with the author.
|
39
|
-
|
40
|
-
4. You may modify and include the part of the software into any other
|
41
|
-
software (possibly commercial). But some files in the distribution
|
42
|
-
are not written by the author, so that they are not under these terms.
|
43
|
-
|
44
|
-
For the list of those files and their copying conditions, see the
|
45
|
-
file LEGAL.
|
46
|
-
|
47
|
-
5. The scripts and library files supplied as input to or produced as
|
48
|
-
output from the software do not automatically fall under the
|
49
|
-
copyright of the software, but belong to whomever generated them,
|
50
|
-
and may be sold commercially, and may be aggregated with this
|
51
|
-
software.
|
52
|
-
|
53
|
-
6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
|
54
|
-
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
55
|
-
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
56
|
-
PURPOSE.
|