Module: ThreeScale::API::HttpClient::JSONParser
- Defined in:
- lib/3scale/api/http_client.rb
Class Method Summary collapse
Class Method Details
.decode(string) ⇒ Object
81 82 83 84 85 86 |
# File 'lib/3scale/api/http_client.rb', line 81 def decode(string) case string when ' '.freeze, ''.freeze then nil else ::JSON.parse(string) end end |
.encode(query) ⇒ Object
88 89 90 |
# File 'lib/3scale/api/http_client.rb', line 88 def encode(query) ::JSON.generate(query) end |