mirror of
https://github.com/fankes/moshi.git
synced 2025-10-19 16:09:21 +08:00
Adds method scope to Json annotation for use with AutoValue.
This commit is contained in:
@@ -20,10 +20,11 @@ import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
import static java.lang.annotation.ElementType.FIELD;
|
||||
import static java.lang.annotation.ElementType.METHOD;
|
||||
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
||||
|
||||
/** Customizes how a field is encoded as JSON. */
|
||||
@Target(FIELD)
|
||||
@Target({FIELD, METHOD})
|
||||
@Retention(RUNTIME)
|
||||
@Documented
|
||||
public @interface Json {
|
||||
|
Reference in New Issue
Block a user