Module: ThreeScale::API::HttpClient::JSONParser
- Defined in:
- lib/3scale/api/http_client.rb
Class Method Summary collapse
Class Method Details
.decode(string) ⇒ Object
99 100 101 102 103 104 |
# File 'lib/3scale/api/http_client.rb', line 99 def decode(string) case string when nil, ' '.freeze, ''.freeze then nil else ::JSON.parse(string) end end |
.encode(query) ⇒ Object
106 107 108 |
# File 'lib/3scale/api/http_client.rb', line 106 def encode(query) ::JSON.generate(query) end |