public abstract class JsonSerializer extends Object implements Serializer
| Constructor and Description |
|---|
JsonSerializer() |
| Modifier and Type | Method and Description |
|---|---|
void |
serialize(HttpRequest request,
HttpResponse response)
This method should set the response data in the response and the
neccessary modifications in the response headers.
|
abstract byte[] |
toJson(HttpRequest req,
HttpResponse resp)
This method is used to serialize data in JSON format
|
public void serialize(HttpRequest request, HttpResponse response)
Serializerserialize in interface Serializerrequest - The request object of the the current request it is
processingresponse - The response object that will be used to send the response
to the requestHttpRequest,
HttpResponsepublic abstract byte[] toJson(HttpRequest req, HttpResponse resp)
req - The http request for which the data is being serializedresp - The http response object which sends this serialized data.Copyright © 2017. All rights reserved.