Class: Transcoder::Json

Inherits:
Parser
  • Object
show all
Defined in:
lib/transcoder/parser/json/handler.rb,
lib/transcoder/parser/json/identifier.rb

Constant Summary collapse

Handler =
JSON

Class Method Summary collapse

Class Method Details

.generate(objects) ⇒ Object

Raises:



12
13
14
15
# File 'lib/transcoder/parser/json/identifier.rb', line 12

def self.generate(objects)
  raise TypeError unless objects.is_a? Hash or objects.is_a? Array
  Json::Handler.generate(objects)
end

.parse(raw) ⇒ Object



17
18
19
# File 'lib/transcoder/parser/json/identifier.rb', line 17

def self.parse(raw)
  Json::Handler.parse(raw)
end