smarter_json 0.9.2 → 0.9.9
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/.gitignore +1 -0
- data/CHANGELOG.md +77 -54
- data/README.md +215 -72
- data/docs/_introduction.md +6 -12
- data/docs/basic_read_api.md +29 -19
- data/docs/basic_write_api.md +2 -2
- data/docs/examples.md +32 -23
- data/docs/options.md +14 -14
- data/ext/smarter_json/smarter_json.c +223 -89
- data/ext/smarter_json/vendor/LICENSE-fast_float-MIT +27 -0
- data/ext/smarter_json/vendor/eisel_lemire.h +117 -0
- data/ext/smarter_json/vendor/eisel_lemire.md +29 -0
- data/ext/smarter_json/vendor/eisel_lemire_powers.h +663 -0
- data/lib/smarter_json/backports.rb +28 -0
- data/lib/smarter_json/options.rb +52 -0
- data/lib/smarter_json/parser.rb +400 -139
- data/lib/smarter_json/version.rb +1 -1
- data/lib/smarter_json.rb +3 -1
- metadata +9 -5
- data/ext/smarter_json/vendor/ryu.h +0 -819
- data/ext/smarter_json/vendor/ryu.md +0 -22
data/lib/smarter_json/version.rb
CHANGED
data/lib/smarter_json.rb
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require "bigdecimal" # for
|
|
3
|
+
require "bigdecimal" # for decimal_precision: :auto / :bigdecimal (Oj-compatible)
|
|
4
4
|
|
|
5
|
+
require_relative "smarter_json/backports" # Enumerable#filter_map backport for Ruby < 2.7 (no-op on 2.7+)
|
|
5
6
|
require_relative "smarter_json/version"
|
|
6
7
|
require_relative "smarter_json/errors" # base Error + subclasses — must load before parser/generator
|
|
7
8
|
require_relative "smarter_json/warning" # SmarterJSON::Warning value object (the warnings: option)
|
|
9
|
+
require_relative "smarter_json/options" # central DEFAULT_OPTIONS + validation — must load before parser
|
|
8
10
|
require_relative "smarter_json/parser"
|
|
9
11
|
require_relative "smarter_json/generator"
|
|
10
12
|
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: smarter_json
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.9.
|
|
4
|
+
version: 0.9.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tilo Sloboda
|
|
8
8
|
bindir: exe
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2026-06-
|
|
10
|
+
date: 2026-06-07 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: bigdecimal
|
|
@@ -49,11 +49,15 @@ files:
|
|
|
49
49
|
- ext/smarter_json/extconf.rb
|
|
50
50
|
- ext/smarter_json/smarter_json.c
|
|
51
51
|
- ext/smarter_json/smarter_json.h
|
|
52
|
-
- ext/smarter_json/vendor/
|
|
53
|
-
- ext/smarter_json/vendor/
|
|
52
|
+
- ext/smarter_json/vendor/LICENSE-fast_float-MIT
|
|
53
|
+
- ext/smarter_json/vendor/eisel_lemire.h
|
|
54
|
+
- ext/smarter_json/vendor/eisel_lemire.md
|
|
55
|
+
- ext/smarter_json/vendor/eisel_lemire_powers.h
|
|
54
56
|
- lib/smarter_json.rb
|
|
57
|
+
- lib/smarter_json/backports.rb
|
|
55
58
|
- lib/smarter_json/errors.rb
|
|
56
59
|
- lib/smarter_json/generator.rb
|
|
60
|
+
- lib/smarter_json/options.rb
|
|
57
61
|
- lib/smarter_json/parser.rb
|
|
58
62
|
- lib/smarter_json/version.rb
|
|
59
63
|
- lib/smarter_json/warning.rb
|
|
@@ -80,7 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
80
84
|
- !ruby/object:Gem::Version
|
|
81
85
|
version: '0'
|
|
82
86
|
requirements: []
|
|
83
|
-
rubygems_version:
|
|
87
|
+
rubygems_version: 3.6.9
|
|
84
88
|
specification_version: 4
|
|
85
89
|
summary: 'SmarterJSON: A lenient, robust, streaming JSON parser for Ruby supporting
|
|
86
90
|
JSON, JSON5, NDJSON, and HJSON-style input.'
|