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

com.dslplatform.json.JsonValue Maven / Gradle / Ivy

There is a newer version: 1.52.1
Show newest version
package com.dslplatform.json;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Specify json value source used for serialization/deserialization.
 *
 * Can be used on field or getter.
 *
 * 
 *     enum MyEnum {
 *         FIRST("a"),
 *         SECOND("b");
 *
 *        {@literal @JsonValue}
 *         public final String value;
 *
 *         MyEnum(String value) {
 *             this.value = value;
 *         }
 *     }
 * 
*/ @Target({ElementType.FIELD, ElementType.METHOD}) @Retention(RetentionPolicy.CLASS) public @interface JsonValue { }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy