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'.freeze
Class Method Summary collapse
Class Method Details
.content_type ⇒ Object
34 35 36 |
# File 'lib/datadog/core/encoding.rb', line 34 def content_type CONTENT_TYPE end |
.encode(obj) ⇒ Object
38 39 40 |
# File 'lib/datadog/core/encoding.rb', line 38 def encode(obj) JSON.dump(obj) end |
.join(encoded_data) ⇒ Object
42 43 44 |
# File 'lib/datadog/core/encoding.rb', line 42 def join(encoded_data) "[#{encoded_data.join(',')}]" end |