com.rollbar.notifier.sender.json.JsonSerializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rollbar-java Show documentation
Show all versions of rollbar-java Show documentation
For connecting your applications built on the JVM to Rollbar for Error Reporting
package com.rollbar.notifier.sender.json;
import com.rollbar.api.payload.Payload;
import com.rollbar.notifier.sender.Sender;
import com.rollbar.notifier.sender.result.Result;
/**
* Serializer to be used by the {@link Sender sender}. the payload to send to Rollbar to json and
* get {@link Result result} from a Rollbar response.
*/
public interface JsonSerializer {
/**
* Parses to a json the payload to be sent.
*
* @param payload the payload to sent.
* @return the payload serialized to json format.
*/
String toJson(Payload payload);
/**
* Parses the response from Rollbar to a {@link Result result}.
*
* @param response the response.
* @return the result.
*/
Result resultFrom(String response);
}