smarter_json 0.9.2 → 1.0.0

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.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SmarterJSON
4
- VERSION = "0.9.2"
4
+ VERSION = "1.0.0"
5
5
  end
data/lib/smarter_json.rb CHANGED
@@ -1,10 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "bigdecimal" # for bigdecimal_load: :auto / :bigdecimal (Oj-compatible)
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.2
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tilo Sloboda
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2026-06-03 00:00:00.000000000 Z
10
+ date: 2026-06-09 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: bigdecimal
@@ -23,10 +23,16 @@ dependencies:
23
23
  - - ">="
24
24
  - !ruby/object:Gem::Version
25
25
  version: '0'
26
- description: 'SmarterJSON is a permissive JSON/JSON5 parser: comments, trailing commas,
27
- different quote styles, Python/JS keywords, and more, all parse to the same Ruby
28
- objects. Purposely no strict mode, always best-effort, blazing fast. Handles BOM,
29
- smart quotes, messy input. Compatible with config/data files and API responses alike.
26
+ description: 'A lenient, fast JSON processor for Ruby. It extracts strict JSON, NDJSON,
27
+ JSON5, HJSON-style config, and the messy JSON-ish input humans and LLMs actually
28
+ write comments, trailing commas, single / unquoted / smart quotes, Python and
29
+ JS keywords, a UTF-8 BOM, and more all parse to the same Ruby objects, with no modes
30
+ or flags to set. Where a traditional parser stops at the first deviation and throws
31
+ away the whole document, SmarterJSON keeps going — it optimizes for getting your
32
+ data out, not for policing the JSON spec. It reads multi-document NDJSON / JSONL
33
+ in one call (and streams it with a block), and in benchmarks its C extension matches
34
+ or beats Oj on nearly every file. SmarterJSON is opinionated: we want your JSON
35
+ processing to be successful.
30
36
 
31
37
  '
32
38
  email:
@@ -49,11 +55,15 @@ files:
49
55
  - ext/smarter_json/extconf.rb
50
56
  - ext/smarter_json/smarter_json.c
51
57
  - ext/smarter_json/smarter_json.h
52
- - ext/smarter_json/vendor/ryu.h
53
- - ext/smarter_json/vendor/ryu.md
58
+ - ext/smarter_json/vendor/LICENSE-fast_float-MIT
59
+ - ext/smarter_json/vendor/eisel_lemire.h
60
+ - ext/smarter_json/vendor/eisel_lemire.md
61
+ - ext/smarter_json/vendor/eisel_lemire_powers.h
54
62
  - lib/smarter_json.rb
63
+ - lib/smarter_json/backports.rb
55
64
  - lib/smarter_json/errors.rb
56
65
  - lib/smarter_json/generator.rb
66
+ - lib/smarter_json/options.rb
57
67
  - lib/smarter_json/parser.rb
58
68
  - lib/smarter_json/version.rb
59
69
  - lib/smarter_json/warning.rb
@@ -80,8 +90,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
80
90
  - !ruby/object:Gem::Version
81
91
  version: '0'
82
92
  requirements: []
83
- rubygems_version: 4.0.11
93
+ rubygems_version: 3.6.9
84
94
  specification_version: 4
85
- summary: 'SmarterJSON: A lenient, robust, streaming JSON parser for Ruby supporting
86
- JSON, JSON5, NDJSON, and HJSON-style input.'
95
+ summary: A lenient, fast JSON processor for Ruby — reads strict JSON, NDJSON, JSON5,
96
+ HJSON, and the messy JSON humans and LLMs actually write.
87
97
  test_files: []