neatjson 0.10.1 → 0.10.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9896a4ef60379130606c3de3b7ce03ed65ce304ce7998470ecb74aaa95878f62
4
- data.tar.gz: 7aa2196577ba6862be5bdf3811c6e2752157aa7b1520bae37697020a1d65d1cc
3
+ metadata.gz: 2e29bd247652e7a911282fd3556f0a19cdb3e1fca0f83b04892ae961e11394ea
4
+ data.tar.gz: c3b4105091a863dc151e49e7d4af197f247af17eb5bdfaf9cc42c584ba76114b
5
5
  SHA512:
6
- metadata.gz: 867bb6fa6cd5af52f708ded86d50adaf1b938e5f114c05cb9801ec40cf7ff0f08e1547400bf98f42087db2b0520eb682e85f88da9a3176f8ad61b611c8bd4944
7
- data.tar.gz: b6b3d72a566b76b50baa82a7fde278f0b0a0c954e698c67fab36d835cf12cae7b1f9a56b5a0fd081ee94501735b6bbea439934057e91ca8f2607d1212ca70574
6
+ metadata.gz: 372b882820a3ea8288c214e305254b54d1234798baa949c4a4b4f3a442d6043c488b14ff160d6323be8cc3ef12c89bac90bf8bcec2312bff40cf9e00ef9e04aa
7
+ data.tar.gz: cc97ed7a14dea8224747c405213fcefefdc3866aef0a6686d73fa9c9259bf87b3c0cc573786c9ad1fcdf4652a6a045cd7554c922854390d119d49b5b7dd5bcc4
data/README.md CHANGED
@@ -5,10 +5,13 @@
5
5
 
6
6
  Pretty-print your JSON in Ruby or JavaScript or Lua with more power than is provided by `JSON.pretty_generate` (Ruby) or `JSON.stringify` (JS). For example, like Ruby's `pp` (pretty print), NeatJSON can keep objects on one line if they fit, but break them over multiple lines if needed.
7
7
 
8
- **Features (all optional):**
8
+ **Features:**
9
9
 
10
- * Keep values on one line, with variable wrap width.
11
- * Format numeric values to specified precision.
10
+ * [Online webpage](http://phrogz.net/JS/NeatJSON) for performing conversions and experimenting with options.
11
+ * _Modifying graphical options on the webpage also gives you the JS code you would need to call to get the same results._
12
+ * Keep multiple values on one line, with variable wrap width.
13
+ * Format numeric values to specified decimal precision.
14
+ * Optionally force specific keys to use floating point representation instead of bare integers for whole number values (e.g. `42.0` instead of `42`).
12
15
  * Sort object keys to be in alphabetical order.
13
16
  * Arbitrary whitespace (or really, any string) for indentation.
14
17
  * "Short" wrapping uses fewer lines, indentation based on values. (See last example below.)
@@ -16,7 +19,6 @@ Pretty-print your JSON in Ruby or JavaScript or Lua with more power than is prov
16
19
  * Adjust number of spaces inside array/object braces.
17
20
  * Adjust number of spaces before/after commas and colons (both for single- vs. multi-line).
18
21
  * Line up the values for an object across lines.
19
- * [Online webpage](http://phrogz.net/JS/NeatJSON) for conversions and experimenting with options.
20
22
  * [Lua only] Produce Lua table serialization.
21
23
 
22
24
 
@@ -27,7 +29,7 @@ Pretty-print your JSON in Ruby or JavaScript or Lua with more power than is prov
27
29
  * [Examples](#examples)
28
30
  * [Options](#options)
29
31
  * [License & Contact](#license--contact)
30
- * [TODO/Known Limitations](#todo-aka-known-limitations)
32
+ * [TODO (aka Known Limitations)](#todo-aka-known-limitations)
31
33
  * [History](#history)
32
34
 
33
35
 
@@ -176,17 +178,17 @@ You may pass any of the following options to `neat_generate` (Ruby) or `neatJSON
176
178
 
177
179
  ~~~ ruby
178
180
  # Ruby
179
- json = JSON.neat_generate my_value, array_padding:1, after_comma:1, before_colon_n:2, indent_last:true
181
+ json = JSON.neat_generate my_value, array_padding:1, after_comma:1, before_colon_n:2
180
182
  ~~~
181
183
 
182
184
  ~~~ js
183
185
  // JavaScript
184
- var json = neatJSON( myValue, { arrayPadding:1, afterComma:1, beforeColonN:2, indentLast:true } );
186
+ var json = neatJSON( myValue, { arrayPadding:1, afterComma:1, beforeColonN:2 } );
185
187
  ~~~
186
188
 
187
189
  ~~~ lua
188
190
  -- Lua
189
- local json = neatJSON( myValue, { arrayPadding=1, afterComma=1, beforeColonN=2, indentLast=true } )
191
+ local json = neatJSON( myValue, { arrayPadding=1, afterComma=1, beforeColonN=2 } )
190
192
  ~~~
191
193
 
192
194
  * `wrap` — Maximum line width before wrapping. Use `false` to never wrap, `true` to always wrap. default:`80`
@@ -276,7 +278,17 @@ For other communication you can [email the author directly](mailto:!@phrogz.net?
276
278
  * Possibly allow "JSON5" output (legal identifiers unquoted, etc.)
277
279
 
278
280
 
279
- ## HISTORY
281
+ ## History
282
+
283
+ * **v0.10.4** — November 17, 2022
284
+ * Online tool shows input/output bytes
285
+
286
+ * **v0.10.2** — August 31, 2022
287
+ * Fix bugs found in JavaScript version related to `trim_trailing_zeros`.
288
+
289
+ * **v0.10.1** — August 29, 2022
290
+ * Fix bugs found when `force_floats_in` was combined with wrapping.
291
+ * Update interactive HTML tool to support new features.
280
292
 
281
293
  * **v0.10** — August 29, 2022
282
294
  * Add `force_floats` and `force_floats_in` to support serialization for non-standard parsers that differentiate between integers and floats.
data/lib/neatjson.rb CHANGED
File without changes
data/neatjson.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
  require 'date'
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "neatjson"
5
- s.version = "0.10.1"
5
+ s.version = "0.10.4"
6
6
  s.date = Date.today.iso8601
7
7
  s.authors = ["Gavin Kistner"]
8
8
  s.email = "gavin@phrogz.net"