All Downloads are FREE. Search and download functionalities are using the official Maven repository.

graphql.kickstart.execution.ExtensionsDeserializer Maven / Gradle / Ivy

package graphql.kickstart.execution;

import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.ObjectCodec;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;
import java.io.IOException;
import java.util.Map;

public class ExtensionsDeserializer extends JsonDeserializer> {

  public static Map deserializeExtensionsObject(
      Object extensions, ObjectCodec codec) {
    return ObjectMapDeserializeHelper.deserializeObjectMapObject(extensions, codec, "extensions");
  }

  @Override
  public Map deserialize(JsonParser p, DeserializationContext ctxt)
      throws IOException {
    return ExtensionsDeserializer.deserializeExtensionsObject(
        p.readValueAs(Object.class), p.getCodec());
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy