@tehw0lf/n8n-nodes-toon 1.4.40 → 1.4.42
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.
- package/README.md +16 -12
- package/dist/package.json +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -254,10 +254,13 @@ Simplify deeply nested JSON structures.
|
|
|
254
254
|
|
|
255
255
|
**Output (with Key Folding):**
|
|
256
256
|
```
|
|
257
|
-
user.profile
|
|
258
|
-
|
|
257
|
+
user.profile:
|
|
258
|
+
name: Alice
|
|
259
|
+
email: alice@example.com
|
|
259
260
|
```
|
|
260
261
|
|
|
262
|
+
Only single-key chains are folded: `user` and `profile` collapse into `user.profile`, while the two fields of `profile` stay nested.
|
|
263
|
+
|
|
261
264
|
### Example 5: Different Delimiters
|
|
262
265
|
|
|
263
266
|
Use tab delimiters for data with commas in values.
|
|
@@ -384,7 +387,16 @@ The specification requires implementations to document the following (§2, §3,
|
|
|
384
387
|
|
|
385
388
|
### Round-Trip Guarantee
|
|
386
389
|
|
|
387
|
-
|
|
390
|
+
JSON → TOON → JSON preserves data, structure and data types (strings, numbers, booleans, null) for valid JSON input, except strings and keys containing an unpaired surrogate, which the encoder rejects with an error (§3). It preserves data, not exact formatting or key positions, with these normalizations:
|
|
391
|
+
|
|
392
|
+
- `-0` becomes `0`.
|
|
393
|
+
- Numbers are IEEE-754 doubles (see "Numeric domain and out-of-range policy (§4)" under [Documented Implementation Behavior](#documented-implementation-behavior)): integers beyond `Number.MAX_SAFE_INTEGER` may lose precision, and a number outside the double range (for example `1e400`, which JavaScript parses as `Infinity`) is not preserved: the encoder writes `null` for it, and `1e-400` becomes `0`.
|
|
394
|
+
- Elements of tabular and keyed tabular forms take the header's field order.
|
|
395
|
+
- Integer-like keys are ordered numerically ahead of string keys, as JavaScript objects do; other keys keep the order in which they were encountered.
|
|
396
|
+
- With Key Folding set to Safe, the nesting is restored only when decoding with Expand Paths set to Safe. With Expand Paths Off the dotted keys stay literal, and other TOON implementations always decode them as literal keys (see [Non-Spec Extensions](#non-spec-extensions)).
|
|
397
|
+
- With Key Folding Off (the default), a literal key whose dot-separated segments are all identifiers (such as `a.b`) in an object that is not inside an array, that is, reachable from the root through objects only (arrays are not searched for dotted keys, see Path Expansion), is written unquoted, so decoding with Expand Paths set to Safe splits it into nested objects, merges it with a sibling object of the same name, or in a conflict fails in strict mode and lets the later line win in non-strict mode. Decode such output with Expand Paths Off (see "Key folding conflicts" under Troubleshooting).
|
|
398
|
+
|
|
399
|
+
See [Documented Implementation Behavior](#documented-implementation-behavior) for details. The implementation passes all conformance requirements for encoders and decoders per the specification.
|
|
388
400
|
|
|
389
401
|
## Advanced Features
|
|
390
402
|
|
|
@@ -430,14 +442,6 @@ When two keys meet at the same key during path expansion (a literal key and an e
|
|
|
430
442
|
|
|
431
443
|
Dotted keys are expanded at any depth, including inside the object value of an expanded dotted key: `a.b:` with a nested `c.d: 1` decodes to `{ "a": { "b": { "c": { "d": 1 } } } }`. Arrays are not searched for dotted keys. Quoted keys are never expanded: `"c.d": 1` decodes to `{ "c.d": 1 }`, and in non-strict mode the last write of a key decides whether it counts as quoted.
|
|
432
444
|
|
|
433
|
-
### Round-Trip Guarantees
|
|
434
|
-
|
|
435
|
-
TOON guarantees lossless round-trip conversion:
|
|
436
|
-
|
|
437
|
-
- **JSON → TOON → JSON** preserves all data and structure
|
|
438
|
-
- Works with any valid JSON input
|
|
439
|
-
- Maintains data types (strings, numbers, booleans, null)
|
|
440
|
-
|
|
441
445
|
## Zero Dependencies
|
|
442
446
|
|
|
443
447
|
This node has **zero production dependencies**:
|
|
@@ -472,7 +476,7 @@ This node has **zero production dependencies**:
|
|
|
472
476
|
|
|
473
477
|
**Cause:** TOON normalizes some values and key positions. `-0` becomes `0`; elements of tabular and keyed tabular forms take the header's field order; and integer-like keys are ordered numerically ahead of string keys, as JavaScript objects do. Other object keys keep the order in which they were encountered (see "Object key order (§2)" under [Documented Implementation Behavior](#documented-implementation-behavior)). With Key Folding set to Safe, a decode with Expand Paths left at Off keeps the dotted keys literal instead of restoring the nested objects.
|
|
474
478
|
|
|
475
|
-
**Solution:** This is expected — TOON preserves data, not exact formatting. When you use Key Folding, set Expand Paths to Safe when decoding to restore the nesting.
|
|
479
|
+
**Solution:** This is expected — TOON preserves data, not exact formatting. See [Round-Trip Guarantee](#round-trip-guarantee). When you use Key Folding, set Expand Paths to Safe when decoding to restore the nesting.
|
|
476
480
|
|
|
477
481
|
## Automated Monitoring
|
|
478
482
|
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tehw0lf/n8n-nodes-toon",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.42",
|
|
4
4
|
"description": "n8n node for TOON (Token-Oriented Object Notation) format conversion - bidirectional conversion between TOON and JSON with zero external dependencies",
|
|
5
5
|
"toonSpecVersion": "4.4.0",
|
|
6
6
|
"license": "MIT",
|