Annotation Interface Formatted


@Documented @Retention(RUNTIME) @Target(TYPE) public @interface Formatted
Annotation to specify the output format for a class.

When applied to a class, the agent will automatically use the specified format when serializing instances of that class.

Example usage:

 @Formatted(OutputFormat.YAML)
 public class SpecResponse {
     private String setting;
     private int value;
 }
 
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The output format to use for serialization.
  • Element Details

    • value

      The output format to use for serialization.
      Returns:
      the output format, defaults to JSON
      Default:
      JSON