Annotation Type JSON


  • @Documented
    @Retention(RUNTIME)
    @Target({FIELD,METHOD,TYPE})
    public @interface JSON
    JSON annotation defines if some property has to be included or excluded from the serialization.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      boolean include
      Specifies if a property should be included or excluded from the JSON serialization.
      java.lang.String name
      Defines different property name for annotated item.
      boolean strict
      Defines if JSON serialization of a class works in a strict mode when only fields with the annotation are serialized.
    • Element Detail

      • strict

        boolean strict
        Defines if JSON serialization of a class works in a strict mode when only fields with the annotation are serialized.
        Default:
        false
      • name

        java.lang.String name
        Defines different property name for annotated item. Used both for serialization and parsing.
        Default:
        ""
      • include

        boolean include
        Specifies if a property should be included or excluded from the JSON serialization.
        Default:
        true