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