Class: BraintreeHttp::Json
- Inherits:
-
Object
- Object
- BraintreeHttp::Json
- Defined in:
- lib/braintreehttp/encoder.rb
Instance Method Summary collapse
Instance Method Details
#content_type ⇒ Object
55 56 57 |
# File 'lib/braintreehttp/encoder.rb', line 55 def content_type /^application\/json$/ end |
#decode(body) ⇒ Object
51 52 53 |
# File 'lib/braintreehttp/encoder.rb', line 51 def decode(body) JSON.parse(body) end |
#encode(body) ⇒ Object
47 48 49 |
# File 'lib/braintreehttp/encoder.rb', line 47 def encode(body) JSON.generate(body) end |