Module: Vault::Rails::JSONSerializer
- Defined in:
- lib/vault/rails/json_serializer.rb
Constant Summary collapse
- DECODE_OPTIONS =
{ max_nested: false, create_additions: false, }.freeze
Class Method Summary collapse
Class Method Details
.decode(raw) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/vault/rails/json_serializer.rb', line 18 def self.decode(raw) _init! return nil if raw == nil || raw == "" JSON.parse(raw, DECODE_OPTIONS) end |
.encode(raw) ⇒ Object
12 13 14 15 16 |
# File 'lib/vault/rails/json_serializer.rb', line 12 def self.encode(raw) _init! JSON.fast_generate(raw) end |