json 3.0.0-java → 3.0.1-java
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 +4 -0
- data/lib/json/common.rb +18 -10
- data/lib/json/ext/generator.jar +0 -0
- data/lib/json/ext/parser.jar +0 -0
- data/lib/json/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6172ab55daf2cd89c12ee78ff4262de865bd7dfd20f40ad8669353b78ebaa8d8
|
|
4
|
+
data.tar.gz: c87e0ad55b7637f1d691af7bae9ec9c261622aa49b1c66bd3cb80d5a0e6b9c1b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 26761f2f23036bc7aa235eb016d2fe28eac9a21b5c4efae05a987a7461550f356c9d7435f59b87646cb15b9383e04e42e9211354a9d1e6c7be4847c835b85be6
|
|
7
|
+
data.tar.gz: 5f5825feaa01223c314de88082508f6928e5171cb65114d8ed51b2636c546a078fbce9294a6baec61d0058492638c89fe110745add121cf14d87fb1d494eb1f7
|
data/CHANGES.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
### Unreleased
|
|
4
4
|
|
|
5
|
+
### 2026-09-08 (3.0.1)
|
|
6
|
+
|
|
7
|
+
* Restore the `limit` positional argument of `JSON.dump`.
|
|
8
|
+
|
|
5
9
|
### 2026-09-07 (3.0.0)
|
|
6
10
|
|
|
7
11
|
* Add `JSON::ParserError#json_path` to locate parse errors in the document as a JSONPath-style string (e.g. `$.foo[0].bar`). For duplicate key errors it points at the duplicated key itself.
|
data/lib/json/common.rb
CHANGED
|
@@ -726,16 +726,14 @@ module JSON
|
|
|
726
726
|
end
|
|
727
727
|
|
|
728
728
|
# :call-seq:
|
|
729
|
-
# JSON.dump(obj, io = nil, options = nil)
|
|
729
|
+
# JSON.dump(obj, io = nil, _deprecated_limit = nil, options = nil)
|
|
730
730
|
#
|
|
731
731
|
# Dumps +obj+ as a \JSON string, i.e. calls generate on the object and returns the result.
|
|
732
732
|
#
|
|
733
|
-
# The default options can be changed via method JSON.dump_default_options.
|
|
734
|
-
#
|
|
735
733
|
# - Argument +io+, if given, should respond to method +write+;
|
|
736
734
|
# the \JSON \String is written to +io+, and +io+ is returned.
|
|
737
735
|
# If +io+ is not given, the \JSON \String is returned.
|
|
738
|
-
#
|
|
736
|
+
# - Argument +_deprecated_limit+ is deprecated, pass the +:max_nesting+ option instead.
|
|
739
737
|
# ---
|
|
740
738
|
#
|
|
741
739
|
# When argument +io+ is not given, returns the \JSON \String generated from +obj+:
|
|
@@ -751,21 +749,31 @@ module JSON
|
|
|
751
749
|
# puts File.read(path)
|
|
752
750
|
# Output:
|
|
753
751
|
# {"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"}
|
|
754
|
-
def dump(obj, anIO = nil, kwargs = nil)
|
|
752
|
+
def dump(obj, anIO = nil, _deprecated_limit = nil, kwargs = nil)
|
|
755
753
|
if kwargs.nil?
|
|
756
|
-
if
|
|
757
|
-
|
|
758
|
-
|
|
754
|
+
if _deprecated_limit.nil?
|
|
755
|
+
if anIO.is_a?(Hash)
|
|
756
|
+
kwargs = anIO
|
|
757
|
+
anIO = nil
|
|
758
|
+
end
|
|
759
|
+
elsif _deprecated_limit.is_a?(Hash)
|
|
760
|
+
kwargs = _deprecated_limit
|
|
761
|
+
_deprecated_limit = nil
|
|
759
762
|
end
|
|
760
763
|
end
|
|
761
764
|
|
|
762
|
-
|
|
763
|
-
|
|
765
|
+
unless anIO.nil?
|
|
766
|
+
if anIO.respond_to?(:to_io)
|
|
767
|
+
anIO = anIO.to_io
|
|
768
|
+
elsif _deprecated_limit.nil? && !anIO.respond_to?(:write)
|
|
769
|
+
anIO, _deprecated_limit = nil, anIO
|
|
770
|
+
end
|
|
764
771
|
end
|
|
765
772
|
|
|
766
773
|
opts = {
|
|
767
774
|
allow_nan: true,
|
|
768
775
|
}
|
|
776
|
+
opts[:max_nesting] = _deprecated_limit if _deprecated_limit
|
|
769
777
|
opts.merge!(kwargs) if kwargs
|
|
770
778
|
|
|
771
779
|
State.generate(obj, opts, anIO)
|
data/lib/json/ext/generator.jar
CHANGED
|
Binary file
|
data/lib/json/ext/parser.jar
CHANGED
|
Binary file
|
data/lib/json/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: json
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.0.
|
|
4
|
+
version: 3.0.1
|
|
5
5
|
platform: java
|
|
6
6
|
authors:
|
|
7
7
|
- Daniel Luz
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2026-09-
|
|
10
|
+
date: 2026-09-08 00:00:00.000000000 Z
|
|
11
11
|
dependencies: []
|
|
12
12
|
description: A JSON implementation as a JRuby extension.
|
|
13
13
|
email: dev+ruby@mernen.com
|