Class: HTTParty::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/samtrafiken_api.rb

Overview

A custom Parser::json implementation that converts API data to UTF-8.

See http://www.trafiklab.se/blogg/2013/aug/13e-september-uppgraderas-api-proxyn-alla-bor-testa-sina-applikationer

Instance Method Summary collapse

Instance Method Details

#jsonObject



14
15
16
# File 'lib/samtrafiken_api.rb', line 14

def json
  JSON.load(body.force_encoding("ISO-8859-1").encode("UTF-8"), nil)
end