Method: Cfer::Util::Json.format_json
- Defined in:
- lib/cfer/util/json.rb
.format_json(item) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/cfer/util/json.rb', line 14 def format_json(item) case item when Hash format_hash(item) when Array format_array(item) when String format_string(item) when Numeric format_number(item) when TrueClass || FalseClass format_bool(item) else format_string(item.to_s) end end |