Class
JSValueDecoder
public class JSValueDecoder
JSValueDecoder facilitates the decoding of JavaScript value into semantic Decodable types.
Initializers
init()
public init()
Initializes a new JSValueDecoder.
Methods
decode(_:from:userInfo:)
public func decode<T>(_: T.Type = T.self, from value: JSValue, userInfo: [CodingUserInfoKey: Any] = [:]) throws -> T where T: Decodable
Decodes a top-level value of the given type from the given JavaScript value representation.
Parameters
| Name | Type | Description |
|---|---|---|
| T | The type of the value to decode. |
|
| value | JSValue |
The |