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

com.grafana.foundation.common.BoolOrUint32Serializer Maven / Gradle / Ivy

There is a newer version: 11.3.0-1730898216
Show newest version
// Code generated - EDITING IS FUTILE. DO NOT EDIT.

package com.grafana.foundation.common;

import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;

import java.io.IOException;

public class BoolOrUint32Serializer extends JsonSerializer {

    @Override
    public void serialize(BoolOrUint32 value, JsonGenerator gen, SerializerProvider serializerProvider) throws IOException {
         if (value.bool != null) {
            gen.writeObject(value.bool);
        }
         else  if (value.uint32 != null) {
            gen.writeObject(value.uint32);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy