json_pure 2.4.1 → 2.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +24 -5
  3. data/README.md +3 -3
  4. data/VERSION +1 -1
  5. data/json_pure.gemspec +3 -9
  6. data/lib/json/common.rb +34 -13
  7. data/lib/json/pure/parser.rb +1 -1
  8. data/lib/json/version.rb +1 -1
  9. data/lib/json.rb +1 -1
  10. metadata +7 -84
  11. data/Gemfile +0 -14
  12. data/lib/json/ext/.keep +0 -0
  13. data/tests/fixtures/fail10.json +0 -1
  14. data/tests/fixtures/fail11.json +0 -1
  15. data/tests/fixtures/fail12.json +0 -1
  16. data/tests/fixtures/fail13.json +0 -1
  17. data/tests/fixtures/fail14.json +0 -1
  18. data/tests/fixtures/fail18.json +0 -1
  19. data/tests/fixtures/fail19.json +0 -1
  20. data/tests/fixtures/fail2.json +0 -1
  21. data/tests/fixtures/fail20.json +0 -1
  22. data/tests/fixtures/fail21.json +0 -1
  23. data/tests/fixtures/fail22.json +0 -1
  24. data/tests/fixtures/fail23.json +0 -1
  25. data/tests/fixtures/fail24.json +0 -1
  26. data/tests/fixtures/fail25.json +0 -1
  27. data/tests/fixtures/fail27.json +0 -2
  28. data/tests/fixtures/fail28.json +0 -2
  29. data/tests/fixtures/fail29.json +0 -1
  30. data/tests/fixtures/fail3.json +0 -1
  31. data/tests/fixtures/fail30.json +0 -1
  32. data/tests/fixtures/fail31.json +0 -1
  33. data/tests/fixtures/fail32.json +0 -1
  34. data/tests/fixtures/fail4.json +0 -1
  35. data/tests/fixtures/fail5.json +0 -1
  36. data/tests/fixtures/fail6.json +0 -1
  37. data/tests/fixtures/fail7.json +0 -1
  38. data/tests/fixtures/fail8.json +0 -1
  39. data/tests/fixtures/fail9.json +0 -1
  40. data/tests/fixtures/obsolete_fail1.json +0 -1
  41. data/tests/fixtures/pass1.json +0 -56
  42. data/tests/fixtures/pass15.json +0 -1
  43. data/tests/fixtures/pass16.json +0 -1
  44. data/tests/fixtures/pass17.json +0 -1
  45. data/tests/fixtures/pass2.json +0 -1
  46. data/tests/fixtures/pass26.json +0 -1
  47. data/tests/fixtures/pass3.json +0 -6
  48. data/tests/json_addition_test.rb +0 -199
  49. data/tests/json_common_interface_test.rb +0 -169
  50. data/tests/json_encoding_test.rb +0 -107
  51. data/tests/json_ext_parser_test.rb +0 -15
  52. data/tests/json_fixtures_test.rb +0 -40
  53. data/tests/json_generator_test.rb +0 -432
  54. data/tests/json_generic_object_test.rb +0 -82
  55. data/tests/json_parser_test.rb +0 -497
  56. data/tests/json_string_matching_test.rb +0 -38
  57. data/tests/test_helper.rb +0 -17
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ccaf5d00b6462faaa558a21e868626904f051a833eea93e81e2ae2e3cdc9dfd0
4
- data.tar.gz: 63d055fcb71de6f94d7c2632aba540f5450631a96813a7eee962939a0957b43d
3
+ metadata.gz: 820b895dd3defc1917ad0da99381fdca3700739b928f9bc5a2f47a9b9360e67d
4
+ data.tar.gz: 9568c251727c4ec133f4cc63fcec532bfe3c2b755c52f9477431aa82a6f432e3
5
5
  SHA512:
6
- metadata.gz: 7f40f310a0c21b71b936caa11fa219f24a746719d4e7f10c07a2dc7747a741943344a639ad21b404964413d00fe3f9a74c97e936d3fe82a1a36c23aae522724e
7
- data.tar.gz: 53cc02a7433b9d08cd7f6ba48bce2de608c8daac160e662fa8cf14d65173b9402527390a521aa90a1679fb0ee67f4e9a25b1e3cf4baeb7765c7adc12439f13fc
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 compatibiliy to ruby 2.4 integer unification.
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
- explicitely requested by setting the create_additions argument to true or
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 explicitely enabled by
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 comapatible with MRI, YARV and Rubinius.
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 exeception for nan and infinite floats.
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
- [![Travis Widget](http://travis-ci.org/flori/json.svg?branch=master)](https://travis-ci.org/flori/json)
3
+ [![CI](https://github.com/flori/json/actions/workflows/ci.yml/badge.svg)](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
- javasript prototype library http://www.prototypejs.org works.
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
- compatbile JSON document, 3 is is `JSON::Pure::Parser`, and 4 is
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.4.1
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 implemention for ruby".freeze, "--main".freeze, "README.md".freeze]
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
- ] + Dir["tests/**/*"]
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.0".freeze)
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, State.new(
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
- const_set :PRETTY_STATE_PROTOTYPE, State.new(
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
- # Sets or returns create identifier, which is used to decide if the _json_create_
103
- # hook of a class should be called; initial value is +json_class+:
104
- # JSON.create_id # => 'json_class'
105
- attr_accessor :create_id
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 = SAFE_STATE_PROTOTYPE.dup
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 = FAST_STATE_PROTOTYPE.dup
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 = PRETTY_STATE_PROTOTYPE.dup
394
+ state = JSON.create_pretty_state
374
395
  end
375
396
  if opts
376
397
  if opts.respond_to? :to_hash
@@ -45,7 +45,7 @@ module JSON
45
45
  /(?=\*/) # single slash before this comment's end
46
46
  )*
47
47
  \*/ # the End of this comment
48
- |[ \t\r\n]+ # whitespaces: space, horicontal tab, lf, cr
48
+ |[ \t\r\n]+ # whitespaces: space, horizontal tab, lf, cr
49
49
  )+
50
50
  )mx
51
51
 
data/lib/json/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: false
2
2
  module JSON
3
3
  # JSON version
4
- VERSION = '2.4.1'
4
+ VERSION = '2.6.1'
5
5
  VERSION_ARRAY = VERSION.split(/\./).map { |x| x.to_i } # :nodoc:
6
6
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
7
7
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
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.1
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: 2020-12-17 00:00:00.000000000 Z
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 implemention for ruby
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.0'
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.2.1
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
@@ -1 +0,0 @@
1
- {"Extra value after close": true} "misplaced quoted value"
@@ -1 +0,0 @@
1
- {"Illegal expression": 1 + 2}
@@ -1 +0,0 @@
1
- {"Illegal invocation": alert()}
@@ -1 +0,0 @@
1
- {"Numbers cannot have leading zeroes": 013}
@@ -1 +0,0 @@
1
- {"Numbers cannot be hex": 0x14}
@@ -1 +0,0 @@
1
- [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[["Too deep"]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]
@@ -1 +0,0 @@
1
- {"Missing colon" null}
@@ -1 +0,0 @@
1
- ["Unclosed array"
@@ -1 +0,0 @@
1
- {"Double colon":: null}
@@ -1 +0,0 @@
1
- {"Comma instead of colon", null}
@@ -1 +0,0 @@
1
- ["Colon instead of comma": false]
@@ -1 +0,0 @@
1
- ["Bad value", truth]
@@ -1 +0,0 @@
1
- ['single quote']
@@ -1 +0,0 @@
1
- ["tab character in string "]
@@ -1,2 +0,0 @@
1
- ["line
2
- break"]
@@ -1,2 +0,0 @@
1
- ["line\
2
- break"]
@@ -1 +0,0 @@
1
- {
@@ -1 +0,0 @@
1
- {unquoted_key: "keys must be quoted"}
@@ -1 +0,0 @@
1
- [
@@ -1 +0,0 @@
1
- [1, 2, 3,
@@ -1 +0,0 @@
1
- {"foo": "bar"
@@ -1 +0,0 @@
1
- ["extra comma",]
@@ -1 +0,0 @@
1
- ["double extra comma",,]
@@ -1 +0,0 @@
1
- [ , "<-- missing value"]
@@ -1 +0,0 @@
1
- ["Comma after the close"],
@@ -1 +0,0 @@
1
- ["Extra close"]]
@@ -1 +0,0 @@
1
- {"Extra comma": true,}
@@ -1 +0,0 @@
1
- "A JSON payload should be an object or array, not a string."
@@ -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": "&#34; \u0022 %22 0x22 034 &#x22;",
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"]
@@ -1 +0,0 @@
1
- ["Illegal backslash escape: \x15"]
@@ -1 +0,0 @@
1
- ["Illegal backslash escape: \'"]
@@ -1 +0,0 @@
1
- ["Illegal backslash escape: \017"]
@@ -1 +0,0 @@
1
- [[[[[[[[[[[[[[[[[[["Not too deep"]]]]]]]]]]]]]]]]]]]
@@ -1 +0,0 @@
1
- ["tab\ character\ in\ string\ "]
@@ -1,6 +0,0 @@
1
- {
2
- "JSON Test Pattern pass3": {
3
- "The outermost value": "must be an object or array.",
4
- "In this test": "It is an object."
5
- }
6
- }