Class JsonDataAnnotation

java.lang.Object
com.luciad.datamodels.DataAnnotation
com.luciad.datamodels.JsonDataAnnotation
All Implemented Interfaces:
AutoCloseable

public final class JsonDataAnnotation extends DataAnnotation implements AutoCloseable
DataAnnotation that marks a string-typed DataProperty as holding JSON text.

It lets a consumer distinguish a plain string property from properties with JSON string values, for example a property that a decoder could not map to a typed property and preserved as raw JSON text.

This is a flag-style annotation: all instances compare equal. Attach it to a DataProperty with the value type DataType#getStringType() through DataProperty.Builder#addAnnotation.

Since:
2026.1
  • Constructor Details

    • JsonDataAnnotation

      public JsonDataAnnotation()
  • Method Details

    • finalize

      protected void finalize()
      Overrides:
      finalize in class DataAnnotation
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Overrides:
      close in class DataAnnotation
    • isPresent

      public static boolean isPresent(@NotNull DataProperty property)
      Returns whether the given data property is annotated as holding JSON text.
      Parameters:
      property - the data property to check.
      Returns:
      whether the property carries a JsonDataAnnotation.
    • hashCode

      public int hashCode()
      Returns the hash code.
      Overrides:
      hashCode in class DataAnnotation
      Returns:
      the hash code.
    • equals

      public boolean equals(@Nullable Object other)
      Overrides:
      equals in class DataAnnotation