Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2026-01-14 18:18:06 +03:00
parent 845aacd079
commit 6ba464d3d4
2 changed files with 17 additions and 1 deletions

View File

@ -7,6 +7,9 @@ This extends the default JSON serialization adding the following:
- Function serialization (off by default)
- Deep and partial-deep cleen object copy
Possible differences to JSON output:
- Repeating long strings and BigInts can be referenced instead of
reincluded in the output.
## Motivation
@ -45,8 +48,21 @@ loosing:
Thus, care must be taken when serializing structures containing function.
## API
### `STRING_LENGTH_REF` / `settings.string_length_ref`
Defines the default maximum string to include in the output as-is before
referencing.
If set to `0`, referencing will be disabled.
Default: 96
(Dynamic: `.REFERENCE.length * 16`)
### `serialize(..)` / `eJSON.stringify(..)`
### `deserialize(..)` / 'eJSON.parse(..)'

View File

@ -77,7 +77,7 @@ var debug = {
//---------------------------------------------------------------------
module.STRING_LENGTH_REF = REFERENCE.length * 8
module.STRING_LENGTH_REF = REFERENCE.length * 16
//