Skip to main content

API Reference

Classes

Struct

Shared behavior for all structs.

Static Functions

NameDescription
fromJson
Converts a Json to a Struct.
parseJson
Parse a Json string into a Struct.
schema
Retrieve the schema for this struct.
tryFromJson
Converts a Json to a Struct, returning nil if the Json is not valid.
tryParseJson
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.

jsonRequired

optionsOptional

parseJson
Struct.parseJson(json: str);

Parse a Json string into a Struct.

jsonRequired
  • 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.

jsonRequired

tryParseJson
Struct.tryParseJson(json?: str);

Parse a Json string into a Struct, returning nil if the Json is not valid.

jsonOptional
  • Type: str