public static fromJson<T>(json as String) as T
Deserializes JSON into the requested static type.
| Parameter | Description |
|---|---|
json | JSON document to read. |
The deserialized value of type T.
class Point:
public x as Int
public y as Int
point = Object.fromJson<Point>("{\"x\": 10, \"y\": 20}")
print(point.x)