module
Velvet::Output
Defined in:
velvet/output.crClass Method Summary
-
.coerce(field_id : String, value : String, cast : Cast) : JSON::Any
Coerce a raw string value to the correct JSON type based on cast.
- .emit(result : Hash(String, JSON::Any))
-
.parse_bool_string(s : String) : Bool | Nil
Parses a string to Bool?, returning nil for unrecognised tokens.
Class Method Detail
Coerce a raw string value to the correct JSON type based on cast.
def self.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".