Annotation Type Expose


@Retention(RUNTIME)
@Target({FIELD,PARAMETER})
@Documented
public @interface Expose
Indicate that a certain field should be exposed in the serialized form. This annotation is handled correctly if a class uses ReflectionSerializer. Optionally you can control the name of the field in serialize form by setting value(), which is useful to maintain backwards compatibility if you want to refactor the name used in the code but maintaing compatibility with previously serialized objects.

Example:

  • Optional Element Summary

    Optional Elements 
    Modifier and Type Optional Element Description
    String value
    Get the name of the exposed value.
  • Element Details

    • value

      String value
      Get the name of the exposed value. Default is to automatically resolve this.
      Returns:
      Default:
      ""