public class JsonSerializer extends Object implements Serializer
| Constructor and Description |
|---|
JsonSerializer() |
| Modifier and Type | Method and Description |
|---|---|
void |
appendCounter(DatadogCounter counter)
Append a counter to the time series
|
void |
appendGauge(DatadogGauge gauge)
Append a gauge to the time series
|
void |
endObject()
Mark ending of the datadog time series object
|
String |
getAsString()
Get datadog time series object serialized as a string
|
void |
startObject()
Write starting marker of the datadog time series object
|
public void startObject()
throws IOException
SerializerstartObject in interface SerializerIOExceptionpublic void appendGauge(DatadogGauge gauge) throws IOException
SerializerappendGauge in interface SerializerIOExceptionpublic void appendCounter(DatadogCounter counter) throws IOException
SerializerappendCounter in interface SerializerIOExceptionpublic void endObject()
throws IOException
SerializerendObject in interface SerializerIOExceptionpublic String getAsString() throws UnsupportedEncodingException
SerializergetAsString in interface SerializerUnsupportedEncodingExceptionCopyright © 2018. All rights reserved.