Public Instance methods
encode
(data)
[show source]
# File lib/gnip_api/json_parser.rb, line 11 def encode data return encoder.encode(data) end
parse
(data)
[show source]
# File lib/gnip_api/json_parser.rb, line 3 def parse data begin return parser.parse(data) rescue Yajl::ParseError => error raise GnipApi::Errors::JsonParser::ParseError.new("Yajl failed to parse: #{error.class} -- #{error.message}") end end