repl.txt (663B)
1 2 {{alias}}( key, value ) 3 Revives a JSON-serialized complex number. 4 5 The serialization format for complex numbers is an object having the 6 following fields: 7 8 - type: complex number type (e.g., "Complex128", "Complex64") 9 - re: real component (number) 10 - im: imaginary component (number) 11 12 Parameters 13 ---------- 14 key: string 15 Key. 16 17 value: any 18 Value. 19 20 Returns 21 ------- 22 out: any 23 Value or complex number. 24 25 Examples 26 -------- 27 > var str = '{"type":"Complex128","re":5,"im":3}'; 28 > var z = {{alias:@stdlib/utils/parse-json}}( str, {{alias}} ) 29 <Complex128> 30 31 See Also 32 -------- 33