Class: Navigable::Server::Parsers::JSON

Inherits:
Object
  • Object
show all
Defined in:
lib/navigable/server/parsers/json.rb

Class Method Summary collapse

Class Method Details

.parse(text) ⇒ Object



7
8
9
10
11
# File 'lib/navigable/server/parsers/json.rb', line 7

def self.parse(text)
  text ? ::JSON.parse(text) : {}
rescue ::JSON::ParserError
  {}
end