Class Json
java.lang.Object
com.palantir.dialogue.annotations.Json
- All Implemented Interfaces:
DeserializerFactory<Object>, SerializerFactory<Object>
public final class Json
extends Object
implements DeserializerFactory<Object>, SerializerFactory<Object>
Implements conjure-style json body and response handling.
- Successful responses are deserialized using the specified
ObjectMapper. - Error responses will be deserialized as
SerializableErrorandRemoteExceptionwill be thrown. - If that fails,
UnknownRemoteExceptionwill be thrown.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> com.palantir.dialogue.Deserializer<T> deserializerFor(com.palantir.dialogue.TypeMarker<T> type) <T> com.palantir.dialogue.Serializer<T> serializerFor(com.palantir.dialogue.TypeMarker<T> type)
-
Constructor Details
-
Json
public Json() -
Json
public Json(com.fasterxml.jackson.databind.ObjectMapper mapper)
-
-
Method Details
-
deserializerFor
public <T> com.palantir.dialogue.Deserializer<T> deserializerFor(com.palantir.dialogue.TypeMarker<T> type) - Specified by:
deserializerForin interfaceDeserializerFactory<Object>
-
serializerFor
public <T> com.palantir.dialogue.Serializer<T> serializerFor(com.palantir.dialogue.TypeMarker<T> type) - Specified by:
serializerForin interfaceSerializerFactory<Object>
-