mirror of
https://github.com/flynx/serialize.js.git
synced 2026-07-10 03:00:57 +00:00
docs...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
845aacd079
commit
6ba464d3d4
16
README.md
16
README.md
@ -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(..)'
|
||||
|
||||
@ -77,7 +77,7 @@ var debug = {
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
|
||||
module.STRING_LENGTH_REF = REFERENCE.length * 8
|
||||
module.STRING_LENGTH_REF = REFERENCE.length * 16
|
||||
|
||||
|
||||
//
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user