Interface JsonIO.PropertyMapper<V,OB>

All Known Implementing Classes:
APIResponseIO, APIResponsesIO, CallbackIO, CallbackOperationIO, ComponentsIO, ContactIO, ContentIO, DiscriminatorIO, EncodingIO, ExampleObjectIO, ExtensionIO, ExternalDocumentationIO, HeaderIO, InfoIO, LicenseIO, LinkIO, LinkParameterIO, MapModelIO, MediaTypeIO, ModelIO, OAuthFlowIO, OAuthFlowsIO, OAuthScopeIO, OpenAPIDefinitionIO, OperationIO, ParameterIO, PathItemIO, PathItemOperationIO, PathsIO, RequestBodyIO, SchemaIO, SecurityRequirementIO, SecurityRequirementsSetIO, SecuritySchemeIO, ServerIO, ServerVariableIO, TagIO
Enclosing interface:
JsonIO<V,A extends V,O extends V,AB,OB>

public static interface JsonIO.PropertyMapper<V,OB>
  • Method Summary

    Modifier and Type
    Method
    Description
    default Optional<V>
    mapObject(Object object)
    Optionally convert the entire object to a JSON value.
    default void
    mapObject(Object object, OB nodeBuilder)
    Map any additional properties from the given model object to the nodeBuilder that will be the resulting JSON value.
    default Optional<V>
    mapProperty(Object object, String propertyName, Object propertyValue)
    Optionally convert the property with given name and value to a JSON value.
  • Method Details

    • mapObject

      default Optional<V> mapObject(Object object)
      Optionally convert the entire object to a JSON value. If no value mapping should occur, implementations should return an empty Optional.
      Parameters:
      object - model object that may be mapped to a JSON value
      Returns:
      an optional JSON value that is mapped from the object
    • mapProperty

      default Optional<V> mapProperty(Object object, String propertyName, Object propertyValue)
      Optionally convert the property with given name and value to a JSON value. If no value mapping should occur, implementations should return an empty Optional.
    • mapObject

      default void mapObject(Object object, OB nodeBuilder)
      Map any additional properties from the given model object to the nodeBuilder that will be the resulting JSON value.