json_pure 2.4.1 → 2.6.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/CHANGES.md +24 -5
- data/README.md +3 -3
- data/VERSION +1 -1
- data/json_pure.gemspec +3 -9
- data/lib/json/common.rb +34 -13
- data/lib/json/pure/parser.rb +1 -1
- data/lib/json/version.rb +1 -1
- data/lib/json.rb +1 -1
- metadata +7 -84
- data/Gemfile +0 -14
- data/lib/json/ext/.keep +0 -0
- data/tests/fixtures/fail10.json +0 -1
- data/tests/fixtures/fail11.json +0 -1
- data/tests/fixtures/fail12.json +0 -1
- data/tests/fixtures/fail13.json +0 -1
- data/tests/fixtures/fail14.json +0 -1
- data/tests/fixtures/fail18.json +0 -1
- data/tests/fixtures/fail19.json +0 -1
- data/tests/fixtures/fail2.json +0 -1
- data/tests/fixtures/fail20.json +0 -1
- data/tests/fixtures/fail21.json +0 -1
- data/tests/fixtures/fail22.json +0 -1
- data/tests/fixtures/fail23.json +0 -1
- data/tests/fixtures/fail24.json +0 -1
- data/tests/fixtures/fail25.json +0 -1
- data/tests/fixtures/fail27.json +0 -2
- data/tests/fixtures/fail28.json +0 -2
- data/tests/fixtures/fail29.json +0 -1
- data/tests/fixtures/fail3.json +0 -1
- data/tests/fixtures/fail30.json +0 -1
- data/tests/fixtures/fail31.json +0 -1
- data/tests/fixtures/fail32.json +0 -1
- data/tests/fixtures/fail4.json +0 -1
- data/tests/fixtures/fail5.json +0 -1
- data/tests/fixtures/fail6.json +0 -1
- data/tests/fixtures/fail7.json +0 -1
- data/tests/fixtures/fail8.json +0 -1
- data/tests/fixtures/fail9.json +0 -1
- data/tests/fixtures/obsolete_fail1.json +0 -1
- data/tests/fixtures/pass1.json +0 -56
- data/tests/fixtures/pass15.json +0 -1
- data/tests/fixtures/pass16.json +0 -1
- data/tests/fixtures/pass17.json +0 -1
- data/tests/fixtures/pass2.json +0 -1
- data/tests/fixtures/pass26.json +0 -1
- data/tests/fixtures/pass3.json +0 -6
- data/tests/json_addition_test.rb +0 -199
- data/tests/json_common_interface_test.rb +0 -169
- data/tests/json_encoding_test.rb +0 -107
- data/tests/json_ext_parser_test.rb +0 -15
- data/tests/json_fixtures_test.rb +0 -40
- data/tests/json_generator_test.rb +0 -432
- data/tests/json_generic_object_test.rb +0 -82
- data/tests/json_parser_test.rb +0 -497
- data/tests/json_string_matching_test.rb +0 -38
- data/tests/test_helper.rb +0 -17
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 820b895dd3defc1917ad0da99381fdca3700739b928f9bc5a2f47a9b9360e67d
|
|
4
|
+
data.tar.gz: 9568c251727c4ec133f4cc63fcec532bfe3c2b755c52f9477431aa82a6f432e3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3cf9b62dd6f1339be3470d108aa0a984262a26e1d1f9bc933742d6ea93ed3e8fb87bd08f40b2de2977e1e372b8e05c626447a5e7b5dfdacf748fc4a5cc34a585
|
|
7
|
+
data.tar.gz: 7976e0e160a7c36cf7c7c9f2f0a6c9b8487b0a6b8928f0528be18c4077ff901e8ba132cbac1f44e545efb219cb67cba8e88bd058be554ecd91cc4e006c700ab7
|
data/CHANGES.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changes
|
|
2
2
|
|
|
3
|
+
### 2021-10-24 (2.6.1)
|
|
4
|
+
|
|
5
|
+
* Restore version.rb with 2.6.1
|
|
6
|
+
|
|
7
|
+
### 2021-10-14 (2.6.0)
|
|
8
|
+
|
|
9
|
+
* Use `rb_enc_interned_str` if available to reduce allocations in `freeze: true` mode. #451.
|
|
10
|
+
* Bump required_ruby_version to 2.3.
|
|
11
|
+
* Fix compatibility with `GC.compact`.
|
|
12
|
+
* Fix some compilation warnings. #469
|
|
13
|
+
|
|
14
|
+
## 2020-12-22 (2.5.1)
|
|
15
|
+
|
|
16
|
+
* Restore the compatibility for constants of JSON class.
|
|
17
|
+
|
|
18
|
+
## 2020-12-22 (2.5.0)
|
|
19
|
+
|
|
20
|
+
* Ready to Ractor-safe at Ruby 3.0.
|
|
21
|
+
|
|
3
22
|
## 2020-12-17 (2.4.1)
|
|
4
23
|
|
|
5
24
|
* Restore version.rb with 2.4.1
|
|
@@ -75,7 +94,7 @@
|
|
|
75
94
|
|
|
76
95
|
## 2015-09-11 (2.0.0)
|
|
77
96
|
* Now complies to newest JSON RFC 7159.
|
|
78
|
-
* Implements
|
|
97
|
+
* Implements compatibility to ruby 2.4 integer unification.
|
|
79
98
|
* Drops support for old rubies whose life has ended, that is rubies < 2.0.
|
|
80
99
|
Also see https://www.ruby-lang.org/en/news/2014/07/01/eol-for-1-8-7-and-1-9-2/
|
|
81
100
|
* There were still some mentions of dual GPL licensing in the source, but JSON
|
|
@@ -116,9 +135,9 @@
|
|
|
116
135
|
## 2013-02-04 (1.7.7)
|
|
117
136
|
* Security fix for JSON create_additions default value and
|
|
118
137
|
`JSON::GenericObject`. It should not be possible to create additions unless
|
|
119
|
-
|
|
138
|
+
explicitly requested by setting the create_additions argument to true or
|
|
120
139
|
using the JSON.load/dump interface. If `JSON::GenericObject` is supposed to
|
|
121
|
-
be automatically deserialised, this has to be
|
|
140
|
+
be automatically deserialised, this has to be explicitly enabled by
|
|
122
141
|
setting
|
|
123
142
|
JSON::GenericObject.json_creatable = true
|
|
124
143
|
as well.
|
|
@@ -264,7 +283,7 @@
|
|
|
264
283
|
## 2010-04-23 (1.4.0)
|
|
265
284
|
* Major speed improvements and building with simplified
|
|
266
285
|
directory/file-structure.
|
|
267
|
-
* Extension should at least be
|
|
286
|
+
* Extension should at least be compatible with MRI, YARV and Rubinius.
|
|
268
287
|
|
|
269
288
|
## 2010-04-07 (1.2.4)
|
|
270
289
|
* Triger const_missing callback to make Rails' dynamic class loading work.
|
|
@@ -282,7 +301,7 @@
|
|
|
282
301
|
strings in object names/keys.
|
|
283
302
|
|
|
284
303
|
## 2009-10-01 (1.2.0)
|
|
285
|
-
* `fast_generate` now raises an
|
|
304
|
+
* `fast_generate` now raises an exception for nan and infinite floats.
|
|
286
305
|
* On Ruby 1.8 json supports parsing of UTF-8, UTF-16BE, UTF-16LE, UTF-32BE,
|
|
287
306
|
and UTF-32LE JSON documents now. Under Ruby 1.9 the M17n conversion
|
|
288
307
|
functions are used to convert from all supported encodings. ASCII-8BIT
|
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# JSON implementation for Ruby
|
|
2
2
|
|
|
3
|
-
[](https://github.com/flori/json/actions/workflows/ci.yml)
|
|
4
4
|
|
|
5
5
|
## Description
|
|
6
6
|
|
|
@@ -267,7 +267,7 @@ the `pp` library's `pp` methods.
|
|
|
267
267
|
|
|
268
268
|
The script `tools/server.rb` contains a small example if you want to test, how
|
|
269
269
|
receiving a JSON object from a webrick server in your browser with the
|
|
270
|
-
|
|
270
|
+
JavaScript prototype library http://www.prototypejs.org works.
|
|
271
271
|
|
|
272
272
|
## Speed Comparisons
|
|
273
273
|
|
|
@@ -294,7 +294,7 @@ extension:
|
|
|
294
294
|
```
|
|
295
295
|
|
|
296
296
|
In the table above 1 is `JSON::Ext::Parser`, 2 is `YAML.load` with YAML
|
|
297
|
-
|
|
297
|
+
compatible JSON document, 3 is is `JSON::Pure::Parser`, and 4 is
|
|
298
298
|
`ActiveSupport::JSON.decode`. The ActiveSupport JSON-decoder converts the
|
|
299
299
|
input first to YAML and then uses the YAML-parser, the conversion seems to
|
|
300
300
|
slow it down so much that it is only as fast as the `JSON::Pure::Parser`!
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.
|
|
1
|
+
2.6.1
|
data/json_pure.gemspec
CHANGED
|
@@ -11,10 +11,9 @@ Gem::Specification.new do |s|
|
|
|
11
11
|
s.email = "flori@ping.de".freeze
|
|
12
12
|
|
|
13
13
|
s.extra_rdoc_files = ["README.md".freeze]
|
|
14
|
-
s.rdoc_options = ["--title".freeze, "JSON
|
|
14
|
+
s.rdoc_options = ["--title".freeze, "JSON implementation for ruby".freeze, "--main".freeze, "README.md".freeze]
|
|
15
15
|
s.files = [
|
|
16
16
|
"CHANGES.md".freeze,
|
|
17
|
-
"Gemfile".freeze,
|
|
18
17
|
"LICENSE".freeze,
|
|
19
18
|
"README.md".freeze,
|
|
20
19
|
"VERSION".freeze,
|
|
@@ -36,13 +35,12 @@ Gem::Specification.new do |s|
|
|
|
36
35
|
"lib/json/add/time.rb".freeze,
|
|
37
36
|
"lib/json/common.rb".freeze,
|
|
38
37
|
"lib/json/ext.rb".freeze,
|
|
39
|
-
"lib/json/ext/.keep".freeze,
|
|
40
38
|
"lib/json/generic_object.rb".freeze,
|
|
41
39
|
"lib/json/pure.rb".freeze,
|
|
42
40
|
"lib/json/pure/generator.rb".freeze,
|
|
43
41
|
"lib/json/pure/parser.rb".freeze,
|
|
44
42
|
"lib/json/version.rb".freeze,
|
|
45
|
-
]
|
|
43
|
+
]
|
|
46
44
|
s.homepage = "http://flori.github.com/json".freeze
|
|
47
45
|
s.metadata = {
|
|
48
46
|
'bug_tracker_uri' => 'https://github.com/flori/json/issues',
|
|
@@ -53,9 +51,5 @@ Gem::Specification.new do |s|
|
|
|
53
51
|
'wiki_uri' => 'https://github.com/flori/json/wiki'
|
|
54
52
|
}
|
|
55
53
|
|
|
56
|
-
s.required_ruby_version = Gem::Requirement.new(">= 2.
|
|
57
|
-
s.test_files = ["./tests/test_helper.rb".freeze]
|
|
58
|
-
|
|
59
|
-
s.add_development_dependency "rake"
|
|
60
|
-
s.add_development_dependency "test-unit"
|
|
54
|
+
s.required_ruby_version = Gem::Requirement.new(">= 2.3".freeze)
|
|
61
55
|
end
|
data/lib/json/common.rb
CHANGED
|
@@ -71,22 +71,30 @@ module JSON
|
|
|
71
71
|
end
|
|
72
72
|
self.state = generator::State
|
|
73
73
|
const_set :State, self.state
|
|
74
|
-
const_set :SAFE_STATE_PROTOTYPE, State.new
|
|
75
|
-
const_set :FAST_STATE_PROTOTYPE,
|
|
74
|
+
const_set :SAFE_STATE_PROTOTYPE, State.new # for JRuby
|
|
75
|
+
const_set :FAST_STATE_PROTOTYPE, create_fast_state
|
|
76
|
+
const_set :PRETTY_STATE_PROTOTYPE, create_pretty_state
|
|
77
|
+
ensure
|
|
78
|
+
$VERBOSE = old
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
def create_fast_state
|
|
82
|
+
State.new(
|
|
76
83
|
:indent => '',
|
|
77
84
|
:space => '',
|
|
78
85
|
:object_nl => "",
|
|
79
86
|
:array_nl => "",
|
|
80
87
|
:max_nesting => false
|
|
81
88
|
)
|
|
82
|
-
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
def create_pretty_state
|
|
92
|
+
State.new(
|
|
83
93
|
:indent => ' ',
|
|
84
94
|
:space => ' ',
|
|
85
95
|
:object_nl => "\n",
|
|
86
96
|
:array_nl => "\n"
|
|
87
97
|
)
|
|
88
|
-
ensure
|
|
89
|
-
$VERBOSE = old
|
|
90
98
|
end
|
|
91
99
|
|
|
92
100
|
# Returns the JSON generator module that is used by JSON. This is
|
|
@@ -98,13 +106,26 @@ module JSON
|
|
|
98
106
|
# either JSON::Ext::Generator::State or JSON::Pure::Generator::State:
|
|
99
107
|
# JSON.state # => JSON::Ext::Generator::State
|
|
100
108
|
attr_accessor :state
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
DEFAULT_CREATE_ID = 'json_class'.freeze
|
|
112
|
+
private_constant :DEFAULT_CREATE_ID
|
|
113
|
+
|
|
114
|
+
CREATE_ID_TLS_KEY = "JSON.create_id".freeze
|
|
115
|
+
private_constant :CREATE_ID_TLS_KEY
|
|
116
|
+
|
|
117
|
+
# Sets create identifier, which is used to decide if the _json_create_
|
|
118
|
+
# hook of a class should be called; initial value is +json_class+:
|
|
119
|
+
# JSON.create_id # => 'json_class'
|
|
120
|
+
def self.create_id=(new_value)
|
|
121
|
+
Thread.current[CREATE_ID_TLS_KEY] = new_value.dup.freeze
|
|
122
|
+
end
|
|
101
123
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
124
|
+
# Returns the current create identifier.
|
|
125
|
+
# See also JSON.create_id=.
|
|
126
|
+
def self.create_id
|
|
127
|
+
Thread.current[CREATE_ID_TLS_KEY] || DEFAULT_CREATE_ID
|
|
106
128
|
end
|
|
107
|
-
self.create_id = 'json_class'
|
|
108
129
|
|
|
109
130
|
NaN = 0.0/0
|
|
110
131
|
|
|
@@ -276,7 +297,7 @@ module JSON
|
|
|
276
297
|
if State === opts
|
|
277
298
|
state, opts = opts, nil
|
|
278
299
|
else
|
|
279
|
-
state =
|
|
300
|
+
state = State.new
|
|
280
301
|
end
|
|
281
302
|
if opts
|
|
282
303
|
if opts.respond_to? :to_hash
|
|
@@ -315,7 +336,7 @@ module JSON
|
|
|
315
336
|
if State === opts
|
|
316
337
|
state, opts = opts, nil
|
|
317
338
|
else
|
|
318
|
-
state =
|
|
339
|
+
state = JSON.create_fast_state
|
|
319
340
|
end
|
|
320
341
|
if opts
|
|
321
342
|
if opts.respond_to? :to_hash
|
|
@@ -370,7 +391,7 @@ module JSON
|
|
|
370
391
|
if State === opts
|
|
371
392
|
state, opts = opts, nil
|
|
372
393
|
else
|
|
373
|
-
state =
|
|
394
|
+
state = JSON.create_pretty_state
|
|
374
395
|
end
|
|
375
396
|
if opts
|
|
376
397
|
if opts.respond_to? :to_hash
|
data/lib/json/pure/parser.rb
CHANGED
data/lib/json/version.rb
CHANGED
data/lib/json.rb
CHANGED
|
@@ -493,7 +493,7 @@ require 'json/common'
|
|
|
493
493
|
# json = JSON.generate(ruby0) # {"json_class":"Customer","v":["Dave","123 Main"]}
|
|
494
494
|
# ruby1 = JSON.parse(json, create_additions: true) # #<struct Customer name="Dave", address="123 Main">
|
|
495
495
|
# ruby1.class # Customer
|
|
496
|
-
|
|
496
|
+
#
|
|
497
497
|
# \Symbol:
|
|
498
498
|
# require 'json/add/symbol'
|
|
499
499
|
# ruby0 = :foo # foo
|
metadata
CHANGED
|
@@ -1,43 +1,15 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: json_pure
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.6.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Florian Frank
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
12
|
-
dependencies:
|
|
13
|
-
- !ruby/object:Gem::Dependency
|
|
14
|
-
name: rake
|
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
|
16
|
-
requirements:
|
|
17
|
-
- - ">="
|
|
18
|
-
- !ruby/object:Gem::Version
|
|
19
|
-
version: '0'
|
|
20
|
-
type: :development
|
|
21
|
-
prerelease: false
|
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
-
requirements:
|
|
24
|
-
- - ">="
|
|
25
|
-
- !ruby/object:Gem::Version
|
|
26
|
-
version: '0'
|
|
27
|
-
- !ruby/object:Gem::Dependency
|
|
28
|
-
name: test-unit
|
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
|
30
|
-
requirements:
|
|
31
|
-
- - ">="
|
|
32
|
-
- !ruby/object:Gem::Version
|
|
33
|
-
version: '0'
|
|
34
|
-
type: :development
|
|
35
|
-
prerelease: false
|
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
-
requirements:
|
|
38
|
-
- - ">="
|
|
39
|
-
- !ruby/object:Gem::Version
|
|
40
|
-
version: '0'
|
|
11
|
+
date: 2021-10-24 00:00:00.000000000 Z
|
|
12
|
+
dependencies: []
|
|
41
13
|
description: This is a JSON implementation in pure Ruby.
|
|
42
14
|
email: flori@ping.de
|
|
43
15
|
executables: []
|
|
@@ -45,9 +17,7 @@ extensions: []
|
|
|
45
17
|
extra_rdoc_files:
|
|
46
18
|
- README.md
|
|
47
19
|
files:
|
|
48
|
-
- "./tests/test_helper.rb"
|
|
49
20
|
- CHANGES.md
|
|
50
|
-
- Gemfile
|
|
51
21
|
- LICENSE
|
|
52
22
|
- README.md
|
|
53
23
|
- VERSION
|
|
@@ -69,57 +39,11 @@ files:
|
|
|
69
39
|
- lib/json/add/time.rb
|
|
70
40
|
- lib/json/common.rb
|
|
71
41
|
- lib/json/ext.rb
|
|
72
|
-
- lib/json/ext/.keep
|
|
73
42
|
- lib/json/generic_object.rb
|
|
74
43
|
- lib/json/pure.rb
|
|
75
44
|
- lib/json/pure/generator.rb
|
|
76
45
|
- lib/json/pure/parser.rb
|
|
77
46
|
- lib/json/version.rb
|
|
78
|
-
- tests/fixtures/fail10.json
|
|
79
|
-
- tests/fixtures/fail11.json
|
|
80
|
-
- tests/fixtures/fail12.json
|
|
81
|
-
- tests/fixtures/fail13.json
|
|
82
|
-
- tests/fixtures/fail14.json
|
|
83
|
-
- tests/fixtures/fail18.json
|
|
84
|
-
- tests/fixtures/fail19.json
|
|
85
|
-
- tests/fixtures/fail2.json
|
|
86
|
-
- tests/fixtures/fail20.json
|
|
87
|
-
- tests/fixtures/fail21.json
|
|
88
|
-
- tests/fixtures/fail22.json
|
|
89
|
-
- tests/fixtures/fail23.json
|
|
90
|
-
- tests/fixtures/fail24.json
|
|
91
|
-
- tests/fixtures/fail25.json
|
|
92
|
-
- tests/fixtures/fail27.json
|
|
93
|
-
- tests/fixtures/fail28.json
|
|
94
|
-
- tests/fixtures/fail29.json
|
|
95
|
-
- tests/fixtures/fail3.json
|
|
96
|
-
- tests/fixtures/fail30.json
|
|
97
|
-
- tests/fixtures/fail31.json
|
|
98
|
-
- tests/fixtures/fail32.json
|
|
99
|
-
- tests/fixtures/fail4.json
|
|
100
|
-
- tests/fixtures/fail5.json
|
|
101
|
-
- tests/fixtures/fail6.json
|
|
102
|
-
- tests/fixtures/fail7.json
|
|
103
|
-
- tests/fixtures/fail8.json
|
|
104
|
-
- tests/fixtures/fail9.json
|
|
105
|
-
- tests/fixtures/obsolete_fail1.json
|
|
106
|
-
- tests/fixtures/pass1.json
|
|
107
|
-
- tests/fixtures/pass15.json
|
|
108
|
-
- tests/fixtures/pass16.json
|
|
109
|
-
- tests/fixtures/pass17.json
|
|
110
|
-
- tests/fixtures/pass2.json
|
|
111
|
-
- tests/fixtures/pass26.json
|
|
112
|
-
- tests/fixtures/pass3.json
|
|
113
|
-
- tests/json_addition_test.rb
|
|
114
|
-
- tests/json_common_interface_test.rb
|
|
115
|
-
- tests/json_encoding_test.rb
|
|
116
|
-
- tests/json_ext_parser_test.rb
|
|
117
|
-
- tests/json_fixtures_test.rb
|
|
118
|
-
- tests/json_generator_test.rb
|
|
119
|
-
- tests/json_generic_object_test.rb
|
|
120
|
-
- tests/json_parser_test.rb
|
|
121
|
-
- tests/json_string_matching_test.rb
|
|
122
|
-
- tests/test_helper.rb
|
|
123
47
|
homepage: http://flori.github.com/json
|
|
124
48
|
licenses:
|
|
125
49
|
- Ruby
|
|
@@ -133,7 +57,7 @@ metadata:
|
|
|
133
57
|
post_install_message:
|
|
134
58
|
rdoc_options:
|
|
135
59
|
- "--title"
|
|
136
|
-
- JSON
|
|
60
|
+
- JSON implementation for ruby
|
|
137
61
|
- "--main"
|
|
138
62
|
- README.md
|
|
139
63
|
require_paths:
|
|
@@ -142,16 +66,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
142
66
|
requirements:
|
|
143
67
|
- - ">="
|
|
144
68
|
- !ruby/object:Gem::Version
|
|
145
|
-
version: '2.
|
|
69
|
+
version: '2.3'
|
|
146
70
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
147
71
|
requirements:
|
|
148
72
|
- - ">="
|
|
149
73
|
- !ruby/object:Gem::Version
|
|
150
74
|
version: '0'
|
|
151
75
|
requirements: []
|
|
152
|
-
rubygems_version: 3.
|
|
76
|
+
rubygems_version: 3.3.0.dev
|
|
153
77
|
signing_key:
|
|
154
78
|
specification_version: 4
|
|
155
79
|
summary: JSON Implementation for Ruby
|
|
156
|
-
test_files:
|
|
157
|
-
- "./tests/test_helper.rb"
|
|
80
|
+
test_files: []
|
data/Gemfile
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# vim: set ft=ruby:
|
|
2
|
-
|
|
3
|
-
source 'https://rubygems.org'
|
|
4
|
-
|
|
5
|
-
case ENV['JSON']
|
|
6
|
-
when 'ext', nil
|
|
7
|
-
if ENV['RUBY_ENGINE'] == 'jruby'
|
|
8
|
-
gemspec :name => 'json-java'
|
|
9
|
-
else
|
|
10
|
-
gemspec :name => 'json'
|
|
11
|
-
end
|
|
12
|
-
when 'pure'
|
|
13
|
-
gemspec :name => 'json_pure'
|
|
14
|
-
end
|
data/lib/json/ext/.keep
DELETED
|
File without changes
|
data/tests/fixtures/fail10.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"Extra value after close": true} "misplaced quoted value"
|
data/tests/fixtures/fail11.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"Illegal expression": 1 + 2}
|
data/tests/fixtures/fail12.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"Illegal invocation": alert()}
|
data/tests/fixtures/fail13.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"Numbers cannot have leading zeroes": 013}
|
data/tests/fixtures/fail14.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"Numbers cannot be hex": 0x14}
|
data/tests/fixtures/fail18.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[["Too deep"]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
|
data/tests/fixtures/fail19.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"Missing colon" null}
|
data/tests/fixtures/fail2.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
["Unclosed array"
|
data/tests/fixtures/fail20.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"Double colon":: null}
|
data/tests/fixtures/fail21.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"Comma instead of colon", null}
|
data/tests/fixtures/fail22.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
["Colon instead of comma": false]
|
data/tests/fixtures/fail23.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
["Bad value", truth]
|
data/tests/fixtures/fail24.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
['single quote']
|
data/tests/fixtures/fail25.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
["tab character in string "]
|
data/tests/fixtures/fail27.json
DELETED
data/tests/fixtures/fail28.json
DELETED
data/tests/fixtures/fail29.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{
|
data/tests/fixtures/fail3.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{unquoted_key: "keys must be quoted"}
|
data/tests/fixtures/fail30.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
[
|
data/tests/fixtures/fail31.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
[1, 2, 3,
|
data/tests/fixtures/fail32.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"foo": "bar"
|
data/tests/fixtures/fail4.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
["extra comma",]
|
data/tests/fixtures/fail5.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
["double extra comma",,]
|
data/tests/fixtures/fail6.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
[ , "<-- missing value"]
|
data/tests/fixtures/fail7.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
["Comma after the close"],
|
data/tests/fixtures/fail8.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
["Extra close"]]
|
data/tests/fixtures/fail9.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"Extra comma": true,}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"A JSON payload should be an object or array, not a string."
|
data/tests/fixtures/pass1.json
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
"JSON Test Pattern pass1",
|
|
3
|
-
{"object with 1 member":["array with 1 element"]},
|
|
4
|
-
{},
|
|
5
|
-
[],
|
|
6
|
-
-42,
|
|
7
|
-
true,
|
|
8
|
-
false,
|
|
9
|
-
null,
|
|
10
|
-
{
|
|
11
|
-
"integer": 1234567890,
|
|
12
|
-
"real": -9876.543210,
|
|
13
|
-
"e": 0.123456789e-12,
|
|
14
|
-
"E": 1.234567890E+34,
|
|
15
|
-
"": 23456789012E666,
|
|
16
|
-
"zero": 0,
|
|
17
|
-
"one": 1,
|
|
18
|
-
"space": " ",
|
|
19
|
-
"quote": "\"",
|
|
20
|
-
"backslash": "\\",
|
|
21
|
-
"controls": "\b\f\n\r\t",
|
|
22
|
-
"slash": "/ & \/",
|
|
23
|
-
"alpha": "abcdefghijklmnopqrstuvwyz",
|
|
24
|
-
"ALPHA": "ABCDEFGHIJKLMNOPQRSTUVWYZ",
|
|
25
|
-
"digit": "0123456789",
|
|
26
|
-
"special": "`1~!@#$%^&*()_+-={':[,]}|;.</>?",
|
|
27
|
-
"hex": "\u0123\u4567\u89AB\uCDEF\uabcd\uef4A",
|
|
28
|
-
"true": true,
|
|
29
|
-
"false": false,
|
|
30
|
-
"null": null,
|
|
31
|
-
"array":[ ],
|
|
32
|
-
"object":{ },
|
|
33
|
-
"address": "50 St. James Street",
|
|
34
|
-
"url": "http://www.JSON.org/",
|
|
35
|
-
"comment": "// /* <!-- --",
|
|
36
|
-
"# -- --> */": " ",
|
|
37
|
-
" s p a c e d " :[1,2 , 3
|
|
38
|
-
|
|
39
|
-
,
|
|
40
|
-
|
|
41
|
-
4 , 5 , 6 ,7 ],
|
|
42
|
-
"compact": [1,2,3,4,5,6,7],
|
|
43
|
-
"jsontext": "{\"object with 1 member\":[\"array with 1 element\"]}",
|
|
44
|
-
"quotes": "" \u0022 %22 0x22 034 "",
|
|
45
|
-
"\/\\\"\uCAFE\uBABE\uAB98\uFCDE\ubcda\uef4A\b\f\n\r\t`1~!@#$%^&*()_+-=[]{}|;:',./<>?"
|
|
46
|
-
: "A key can be any string"
|
|
47
|
-
},
|
|
48
|
-
0.5 ,98.6
|
|
49
|
-
,
|
|
50
|
-
99.44
|
|
51
|
-
,
|
|
52
|
-
|
|
53
|
-
1066
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
,"rosebud"]
|
data/tests/fixtures/pass15.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
["Illegal backslash escape: \x15"]
|
data/tests/fixtures/pass16.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
["Illegal backslash escape: \'"]
|
data/tests/fixtures/pass17.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
["Illegal backslash escape: \017"]
|
data/tests/fixtures/pass2.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
[[[[[[[[[[[[[[[[[[["Not too deep"]]]]]]]]]]]]]]]]]]]
|
data/tests/fixtures/pass26.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
["tab\ character\ in\ string\ "]
|