Class: Ubalo::Util::UbaloJSON
- Inherits:
-
Object
- Object
- Ubalo::Util::UbaloJSON
- Defined in:
- lib/ubalo/util.rb
Class Method Summary collapse
Class Method Details
.content_type ⇒ Object
7 8 9 |
# File 'lib/ubalo/util.rb', line 7 def content_type "application/json; schema=ubalo-data" end |
.dump(obj) ⇒ Object
11 12 13 |
# File 'lib/ubalo/util.rb', line 11 def dump(obj) JSON.dump('data' => obj) end |
.load(data) ⇒ Object
15 16 17 |
# File 'lib/ubalo/util.rb', line 15 def load(data) JSON.load(data)['data'] end |