uk.co.mruoc.jsonapi.ApiDocumentFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jackson-json-api Show documentation
Show all versions of jackson-json-api Show documentation
Library containing jackson module and classes to help building APIs that follow the json api spec in Java
package uk.co.mruoc.jsonapi;
import com.fasterxml.jackson.databind.JsonNode;
import java.io.IOException;
import java.util.Optional;
public interface ApiDocumentFactory {
D build(final ApiDataDocumentRequest request) throws IOException;
static Optional extractIdNode(final JsonNode dataNode) {
return Optional.ofNullable(dataNode.get("id"));
}
static JsonNode extractTypeNode(final JsonNode dataNode) {
return dataNode.get("type");
}
static JsonNode extractAttributesNode(final JsonNode dataNode) {
return dataNode.get("attributes");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy