Module: Datadog::Core::Encoding::JSONEncoder
- Extended by:
- Encoder
- Defined in:
- lib/datadog/core/encoding.rb
Overview
Encoder for the JSON format
Constant Summary collapse
- CONTENT_TYPE =
'application/json'
Class Method Summary collapse
Class Method Details
.content_type ⇒ Object
36 37 38 |
# File 'lib/datadog/core/encoding.rb', line 36 def content_type CONTENT_TYPE end |
.encode(obj) ⇒ Object
40 41 42 |
# File 'lib/datadog/core/encoding.rb', line 40 def encode(obj) JSON.dump(obj) end |
.join(encoded_data) ⇒ Object
44 45 46 |
# File 'lib/datadog/core/encoding.rb', line 44 def join(encoded_data) "[#{encoded_data.join(',')}]" end |