Module: ThreeScale::API::HttpClient::JSONParser
- Defined in:
- lib/3scale/api/http_client.rb
Class Method Summary collapse
Class Method Details
.decode(string) ⇒ Object
130 131 132 133 134 135 |
# File 'lib/3scale/api/http_client.rb', line 130 def decode(string) case string when nil, ' '.freeze, ''.freeze then nil else ::JSON.parse(string) end end |
.encode(query) ⇒ Object
137 138 139 |
# File 'lib/3scale/api/http_client.rb', line 137 def encode(query) ::JSON.generate(query) end |