Module: ThreeScale::API::HttpClient::JSONParser
- Defined in:
- lib/3scale/api/http_client.rb
Class Method Summary collapse
Class Method Details
.decode(string) ⇒ Object
142 143 144 145 146 147 |
# File 'lib/3scale/api/http_client.rb', line 142 def decode(string) case string when nil, ' '.freeze, ''.freeze then nil else ::JSON.parse(string) end end |
.encode(query) ⇒ Object
149 150 151 |
# File 'lib/3scale/api/http_client.rb', line 149 def encode(query) ::JSON.generate(query) end |