Class: Hanami::Utils::Json::MultiJsonAdapter Private

Inherits:
Object
  • Object
show all
Defined in:
lib/hanami/utils/json.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

MultiJson adapter

Since:

  • 0.9.1

Instance Method Summary collapse

Instance Method Details

#generate(object) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 0.9.1


31
32
33
# File 'lib/hanami/utils/json.rb', line 31

def generate(object)
  MultiJson.dump(object)
end

#parse(payload) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 0.9.1


25
26
27
# File 'lib/hanami/utils/json.rb', line 25

def parse(payload)
  MultiJson.load(payload)
end