json_canvas

Types

pub type Canvas {
  Canvas(nodes: List(Node), edges: List(Edge))
}

Constructors

  • Canvas(nodes: List(Node), edges: List(Edge))

Functions

pub fn decode(
  from json_canvas: String,
) -> Result(Canvas, DecodeError)

Decode a JSON Canvas string representation into a Canvas type.

pub fn decoder(dyn: Dynamic) -> Result(Canvas, List(DecodeError))

Convert gleam/dynamic’s Dynamic type into a Canvas type.

Search Document