Module: ThreeScale::API::HttpClient::JSONParser
- Defined in:
- lib/3scale/api/http_client.rb
Class Method Summary collapse
Class Method Details
.decode(string) ⇒ Object
114 115 116 117 118 119 |
# File 'lib/3scale/api/http_client.rb', line 114 def decode(string) case string when nil, ' '.freeze, ''.freeze then nil else ::JSON.parse(string) end end |
.encode(query) ⇒ Object
121 122 123 |
# File 'lib/3scale/api/http_client.rb', line 121 def encode(query) ::JSON.generate(query) end |