34 lines
663 B
Plaintext
34 lines
663 B
Plaintext
|
|
||
|
{{alias}}( key, value )
|
||
|
Revives a JSON-serialized complex number.
|
||
|
|
||
|
The serialization format for complex numbers is an object having the
|
||
|
following fields:
|
||
|
|
||
|
- type: complex number type (e.g., "Complex128", "Complex64")
|
||
|
- re: real component (number)
|
||
|
- im: imaginary component (number)
|
||
|
|
||
|
Parameters
|
||
|
----------
|
||
|
key: string
|
||
|
Key.
|
||
|
|
||
|
value: any
|
||
|
Value.
|
||
|
|
||
|
Returns
|
||
|
-------
|
||
|
out: any
|
||
|
Value or complex number.
|
||
|
|
||
|
Examples
|
||
|
--------
|
||
|
> var str = '{"type":"Complex128","re":5,"im":3}';
|
||
|
> var z = {{alias:@stdlib/utils/parse-json}}( str, {{alias}} )
|
||
|
<Complex128>
|
||
|
|
||
|
See Also
|
||
|
--------
|
||
|
|