kata/value

Types

Intermediate representation used as the hub for decode/encode. Format-agnostic: JSON, form data, etc. all convert to/from Value.

pub type Value {
  VNull
  VBool(Bool)
  VInt(Int)
  VFloat(Float)
  VString(String)
  VList(List(Value))
  VObject(List(#(String, Value)))
}

Constructors

  • VNull
  • VBool(Bool)
  • VInt(Int)
  • VFloat(Float)
  • VString(String)
  • VList(List(Value))
  • VObject(List(#(String, Value)))

    Key-value pairs with preserved insertion order. Duplicate keys: first occurrence wins on decode.

Values

pub fn classify(v: Value) -> String

Convert a Value to a human-readable type name (for error messages).

Search Document