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 SerializableError and RemoteException will be thrown.
  • If that fails, UnknownRemoteException will be thrown.
  • 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:
      deserializerFor in interface DeserializerFactory<Object>
    • serializerFor

      public <T> com.palantir.dialogue.Serializer<T> serializerFor(com.palantir.dialogue.TypeMarker<T> type)
      Specified by:
      serializerFor in interface SerializerFactory<Object>