Open
Description
Given the strong type requirements of AS it would be ideal to be able to parse a JSON string directly into a given class. A decorator could be used to generate the serialize/deserialize functionality on the class at compile time.
@serializable
@deserializable
class T {
x: i32
y: string
}
let obj: T = JSON.parse<T>(jsonStr)
This would return an error code if jsonStr is invalid or not deserializable to the class.