View Source Yex.Map (y_ex v0.5.0)

A shareable Map type.

Summary

Types

@type t() :: %Yex.Map{reference: any()}

Functions

Convert to json-compatible format.

Examples Sync two clients by exchanging the complete document structure

iex> doc = Yex.Doc.new()
iex> map = Yex.Doc.get_map(doc, "map")
iex> Yex.Map.set(map, "key", ["Hello", "World"])
iex> Yex.Map.to_json(map)
%{"key" => ["Hello", "World"]}