class CAJ::Builder
- CAJ::Builder
- JSON::Builder
- Reference
- Object
Defined in:
case_aware_json.crConstructors
Instance Method Summary
- #convention : Cases
- #convention=(convention : Cases)
-
#field(name, value)
Writes an object's field and value.
-
#field(name, &)
Writes an object's field and then invokes the block.
- #format_key(key)
Instance methods inherited from class Object
to_json(io : IO, case convention : CAJ::Cases | Symbol)to_json(case convention : CAJ::Cases | Symbol) to_json
Class methods inherited from class Object
from_json(string_or_io, root : String, case convention : CAJ::Cases | Symbol)from_json(string_or_io, case convention : CAJ::Cases | Symbol) from_json
Constructor Detail
Instance Method Detail
def field(name, value)
#
Description copied from class JSON::Builder
Writes an object's field and value.
The field's name is first converted to a String
by invoking
to_s
on it.
def field(name, &)
#
Description copied from class JSON::Builder
Writes an object's field and then invokes the block.
This is equivalent of invoking string(value)
and then
invoking the block.