public class JsonSerializer extends Object implements ResultSerializer
Constructor and Description |
---|
JsonSerializer() |
Modifier and Type | Method and Description |
---|---|
Object |
serialize(Result result)
Serialize the given result to a format expected by client.
|
Object |
serializeError(ResultStatus error)
Serialize an error result to the format expected by the client.
|
public Object serialize(Result result)
ResultSerializer
serialize
in interface ResultSerializer
result
- internal resultpublic Object serializeError(ResultStatus error)
ResultSerializer
serializeError
in interface ResultSerializer
error
- the error resultCopyright © 2022 Apache Software Foundation. All rights reserved.