module Datadog::Encoding::JSONEncoder

Encoder for the JSON format

Constants

CONTENT_TYPE

Public Instance Methods

content_type() click to toggle source
# File lib/ddtrace/encoding.rb, line 35
def content_type
  CONTENT_TYPE
end
encode(obj) click to toggle source
# File lib/ddtrace/encoding.rb, line 39
def encode(obj)
  JSON.dump(obj)
end
join(encoded_data) click to toggle source
# File lib/ddtrace/encoding.rb, line 43
def join(encoded_data)
  "[#{encoded_data.join(',')}]"
end