API Reference
Classes
Struct
Shared behavior for all structs.
Static Functions
Name | Description |
---|---|
| Converts a Json to a Struct. |
| Parse a Json string into a Struct. |
| Retrieve the schema for this struct. |
| Converts a Json to a Struct, returning nil if the Json is not valid. |
| Parse a Json string into a Struct, returning nil if the Json is not valid. |
fromJson
Struct.fromJson(json: Json, options?: JsonValidationOptions);
Converts a Json to a Struct.
json
Required
- Type: Json
options
Optional
- Type: JsonValidationOptions
parseJson
Struct.parseJson(json: str);
Parse a Json string into a Struct.
json
Required
- Type: str
schema
Struct.schema();
Retrieve the schema for this struct.
tryFromJson
Struct.tryFromJson(json: Json);
Converts a Json to a Struct, returning nil if the Json is not valid.
json
Required
- Type: Json
tryParseJson
Struct.tryParseJson(json?: str);
Parse a Json string into a Struct, returning nil if the Json is not valid.
json
Optional
- Type: str