Std.Json.Encode
1 declaration
trait
EncodeA type that writes itself as JSON.
Examples
type Point = { x: Int, y: Int } derives Json.Encode
Json.encode(&Point{x: 1, y: 2}.encode()) // "{\"x\":1,\"y\":2}"1 declaration
EncodeA type that writes itself as JSON.
type Point = { x: Int, y: Int } derives Json.Encode
Json.encode(&Point{x: 1, y: 2}.encode()) // "{\"x\":1,\"y\":2}"