Members
(static, readonly) CasingOption :number
Serializer casing options.
Type:
Properties:
| Name |
Type |
Description |
NONE |
number
|
|
CAMELCASE |
number
|
|
PASCALCASE |
number
|
|
(static, readonly) OptimizerOption :number
Serializer optimizer options.
Type:
Properties:
| Name |
Type |
Description |
NONE |
number
|
|
EXCLUDENULL |
number
|
|
EXCLUDEFALSE |
number
|
|
EXCLUDEZERO |
number
|
|
EXCLUDEEMPTY |
number
|
|
OPTIMIZED |
number
|
|
Methods
(static) deserialize(json, casing, optimizer, properties, exclude, replacer)
Deserializes a JSON string to an object.
Parameters:
| Name |
Type |
Description |
json |
String
|
JSON string to deserialize. |
casing |
CasingOption
|
Casing option. |
optimizer |
OptimizerOption
|
Optimizer option(s). |
properties |
Object
|
List of property keys to include/exclude. |
exclude |
Boolean
|
Defines whether keys in the properties parameter should be included(default) or excluded. |
replacer |
function
|
Replacer method to control property serialization. |
(static) serialize(obj, casing, optimizer, properties, exclude, replacer)
Serializes an object to a JSON string.
Parameters:
| Name |
Type |
Description |
obj |
Object
|
Object to serialize. |
casing |
CasingOption
|
Casing option. |
optimizer |
OptimizerOption
|
Optimizer option(s). |
properties |
Object
|
List of property keys to include/exclude. |
exclude |
Boolean
|
Defines whether keys in the properties parameter should be included(default) or excluded. |
replacer |
function
|
Replacer method to control property serialization. |