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

com.toedter.spring.hateoas.jsonapi.AbstractJsonApiSerializer Maven / Gradle / Ivy

Go to download

Implementation of the media type application/vnd.api+json (JSON:API) to be integrated in Spring HATEOAS.

There is a newer version: 2.1.3
Show newest version
/*
 * Copyright 2023 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.toedter.spring.hateoas.jsonapi;

import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.jsontype.TypeSerializer;
import com.fasterxml.jackson.databind.ser.ContainerSerializer;
import org.springframework.lang.Nullable;

abstract class AbstractJsonApiSerializer extends ContainerSerializer {

    protected AbstractJsonApiSerializer(Class t) {
        super(t);
    }

    protected AbstractJsonApiSerializer(Class t, boolean dummy) {
        super(t, dummy);
    }

    @Override
    @Nullable
    public JavaType getContentType() {
        return null;
    }

    @Override
    @Nullable
    public JsonSerializer getContentSerializer() {
        return null;
    }

    @Override
    public boolean hasSingleElement(T value) {
        return false;
    }

    @Override
    @Nullable
    protected ContainerSerializer _withValueTypeSerializer(TypeSerializer vts) {
        return null;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy