public class JsonSerializerImpl extends java.lang.Object implements JsonSerializer
json serializer.| Constructor and Description |
|---|
JsonSerializerImpl()
Construct a JsonSerializerImpl that does not pretty print the Payload.
|
JsonSerializerImpl(boolean prettyPrint)
Construct a JsonSerializerImpl.
|
| Modifier and Type | Method and Description |
|---|---|
Result |
resultFrom(java.lang.String response)
Parses the response from Rollbar to a
result. |
java.lang.String |
toJson(java.util.Map<java.lang.String,java.lang.Object> map)
Converts the map to a JSON string.
|
java.lang.String |
toJson(com.rollbar.api.payload.Payload payload)
Parses to a json the payload to be sent.
|
public JsonSerializerImpl()
public JsonSerializerImpl(boolean prettyPrint)
prettyPrint - whether or not to pretty print the payload.public java.lang.String toJson(com.rollbar.api.payload.Payload payload)
JsonSerializertoJson in interface JsonSerializerpayload - the payload to sent.public java.lang.String toJson(java.util.Map<java.lang.String,java.lang.Object> map)
map - The map to be converted to a JSON string.public Result resultFrom(java.lang.String response)
JsonSerializerresult.resultFrom in interface JsonSerializerresponse - the response.