JsonObject

class ref JsonObject

Constructors

create

Create a map with space for prealloc elements without triggering a resize. Defaults to 6.

new iso create(
  prealloc: USize val = seq)
: JsonObject iso^

Parameters

  • prealloc: USize val = seq

Returns


from_map

Create a Json object from a map.

new ref from_map(
  data': HashMap[String val, (F64 val | I64 val | Bool val | None val | String val | JsonArray ref | JsonObject ref), HashEq[String val] val] ref)
: JsonObject ref^

Parameters

Returns


Public fields


Public Functions

string

Generate string representation of this object.

fun box string(
  indent: String val = seq,
  pretty_print: Bool val = seq)
: String val

Parameters

  • indent: String val = seq
  • pretty_print: Bool val = seq

Returns


Private Functions

_show

Append the string representation of this object to the provided String.

fun box _show(
  buf': String iso,
  indent: String val = seq,
  level: USize val,
  pretty: Bool val)
: String iso^

Parameters

Returns