Class NestedText.TypeConfiguration<T>

java.lang.Object
org.loxlylabs.nestedtext.NestedText.TypeConfiguration<T>
Type Parameters:
T - The type being configured.
Enclosing class:
NestedText

public static class NestedText.TypeConfiguration<T> extends Object
Provides a fluent API for configuring type-specific mapping rules.
  • Method Details

    • ignoreField

      public NestedText.TypeConfiguration<T> ignoreField(String fieldName)
      Specifies a field to be ignored during serialization and deserialization.
      Parameters:
      fieldName - The name of the field in the Java object.
      Returns:
      this configuration instance for chaining.
    • ignoreFieldWhenNull

      public NestedText.TypeConfiguration<T> ignoreFieldWhenNull(String fieldName)
      Specifies a field to be ignored during serialization when the value is null.
      Parameters:
      fieldName - The name of the field in the Java object.
      Returns:
      this configuration instance for chaining.
    • renameField

      public NestedText.Renamer renameField(String fieldName)
      Specifies a new name for a field during serialization and deserialization.
      Parameters:
      fieldName - The name of the field in the Java object.
      Returns:
      A NestedText.Renamer to specify the new name.