public class AddressingJsonFactory extends Object
Result result = ... String jsonResult = AddressingJsonFactory.getInstance().toJson(result);
Modifier and Type | Method and Description |
---|---|
static AddressingJsonFactory |
getInstance() |
String |
toJson(Object result,
boolean pretty)
Returns a json string for the given object.
|
String |
toJson(Object result,
com.fasterxml.jackson.databind.ObjectMapper mapper,
boolean pretty)
Returns a json string for the given result object.
|
String |
toJson(ParsedAddress result,
boolean pretty)
Returns a json string for the given result object.
|
String |
toJson(PredictionResult result,
boolean pretty)
Returns a json string for the given result object.
|
String |
toJson(Response response,
boolean pretty)
Returns a json string for the given response object.
|
String |
toJson(Result result,
boolean pretty)
Returns a json string for the given result object.
|
public static AddressingJsonFactory getInstance()
public String toJson(Object result, com.fasterxml.jackson.databind.ObjectMapper mapper, boolean pretty) throws AddressingException
result
- any serializable objectmapper
- ObjectMapper
from jackson libpretty
- prettify json stringAddressingException
- exception will be thrown if it fails to serialize object to jsonpublic String toJson(Result result, boolean pretty) throws AddressingException
result
- object containing address and other aspects describing address Result
pretty
- prettify json stringAddressingException
- exception will be thrown if it fails to serialize object to jsonpublic String toJson(PredictionResult result, boolean pretty) throws AddressingException
result
- object containing address and other aspects describing address PredictionResult
pretty
- prettify json stringAddressingException
- exception will be thrown if it fails to serialize object to jsonpublic String toJson(ParsedAddress result, boolean pretty) throws AddressingException
result
- object containing address and other aspects describing address ParsedAddress
pretty
- prettify json stringAddressingException
- exception will be thrown if it fails to serialize object to jsonpublic String toJson(Object result, boolean pretty) throws AddressingException
result
- objectpretty
- prettify json stringAddressingException
- exception will be thrown if it fails to serialize object to jsonpublic String toJson(Response response, boolean pretty) throws AddressingException
response
- containing Response
pretty
- prettify json stringAddressingException
- exception will be thrown if it fails to serialize object to jsonCopyright © 2024. All rights reserved.