001package io.ebean.annotation;
002
003import java.lang.annotation.ElementType;
004import java.lang.annotation.Retention;
005import java.lang.annotation.RetentionPolicy;
006import java.lang.annotation.Target;
007
008/**
009 * Marks a Map property on a bean that unmapped JSON properties go into.
010 * <p>
011 * This property is considered transient (not mapped to a DB column) unlike <code>@DbJson</code> but will be
012 * written to JSON output (unless it also annotated with <code>@JsonIgnore</code>).
013 * </p>
014 * <p>
015 * Being JSON read and written means that in a document store only (ElasticSearch only) case it can hold
016 * all top level unmapped properties.
017 * </p>
018 * <h3>Example:</h3>
019 * <pre>{@code
020 *
021 * @UnmappedJson
022 * Map<String,Object> unmapped;
023 *
024 * }</pre>
025 */
026@Retention(RetentionPolicy.RUNTIME)
027@Target(ElementType.FIELD)
028public @interface UnmappedJson {
029
030}