struct JSON::ObjectBuilder(T)

Overview

Handly struct to write JSON objects

Superclass hierarchy

Object
Value
Struct
JSON::ObjectBuilder(T)

Defined in:

Class Method Summary

Instance Method Summary

Class Method Detail

def self.new(io : T, indent = 0)

Instance Method Detail

def field(name, &block)

Adds a field to this JSON object by specifying it's name, then executes the block, which must append the value.


def field(name, value)

Adds a field to this JSON object