Initializer
init(from:)
Decodes this object from JSON.
init(from decoder: Decoder) throws
Parameters
decoder-
The decoder to read data from.
Discussion
Reads JSON in pyecore format and populates feature values using the reflective API.
Usage
The EClass must be provided through the decoder’s userInfo dictionary:
let decoder = JSONDecoder()
decoder.userInfo[.eClassKey] = employeeClass
let employee = try decoder.decode(DynamicEObject.self, from: jsonData)