Deserializable
Trait for types that can be deserialized from JSON.
Implement this trait to enable automatic deserialization with deserialize().
Example: struct Person(Deserializable): var name: String var age: Int
@staticmethod
def from_json(json: Value) raises -> Self:
return Self(
name=get_string(json, "name"),
age=get_int(json, "age")
)
var person = deserialize[Person]('{"name":"Alice","age":30}')
from_json
def from_json(json: Value) -> Self Deserialize from a JSON Value.