module

Velvet::Output

Class methods

coerce(field_id : String, value : String, cast : Cast) : JSON::Any

Coerce a raw string value to the correct JSON type based on cast.

Source
emit(result : Hash(String, JSON::Any))
Source
parse_bool_string(s : String) : Bool | Nil

Parses a string to Bool?, returning nil for unrecognised tokens. Canonical truthy: "true", "1", "yes". Canonical falsy: "false", "0", "no".

Source