-
- All Superinterfaces:
Unmarshaller<Object>
- All Known Subinterfaces:
EntityBean
,MarshallingObject
,VirtualBean
,WritableBean
,WritableBeanProperty<V>
,WritableBigDecimalProperty
,WritableBigIntegerProperty
,WritableBooleanProperty
,WritableByteProperty
,io.github.mmm.property.container.collection.WritableCollectionProperty<V,E>
,WritableContainerProperty<V,E>
,WritableDoubleProperty
,WritableFloatProperty
,WritableInstantProperty
,WritableIntegerProperty
,WritableListProperty<E>
,WritableLocalDateProperty
,WritableLocalDateTimeProperty
,WritableLocalTimeProperty
,WritableLongProperty
,WritableMapProperty<K,V>
,WritableNumberProperty<N>
,WritableObjectProperty<V>
,WritableOffsetDateTimeProperty
,WritableOffsetTimeProperty
,WritableProperty<V>
,WritableRangeProperty<V>
,WritableSetProperty<E>
,WritableShortProperty
,WritableSimpleProperty<V>
,WritableStringProperty
,WritableZonedDateTimeProperty
- All Known Implementing Classes:
AbstractBean
,AbstractVirtualBean
,AdvancedBean
,Bean
,BeanProperty
,BigDecimalProperty
,BigIntegerProperty
,BooleanProperty
,ByteProperty
,io.github.mmm.property.container.collection.CollectionProperty
,ContainerProperty
,DoubleProperty
,DurationInSecondsProperty
,DynamicBean
,FloatProperty
,IdProperty
,InstantProperty
,IntegerProperty
,LinkProperty
,ListProperty
,LocalDateProperty
,LocalDateTimeProperty
,LocalTimeProperty
,LongProperty
,MapProperty
,NumberProperty
,ObjectProperty
,OffsetDateTimeProperty
,OffsetTimeProperty
,Property
,RangeProperty
,SetProperty
,ShortProperty
,SimpleEntityBean
,SimpleProperty
,StringListProperty
,StringProperty
,TemporalProperty
,ZonedDateTimeProperty
public interface UnmarshallableObject extends Unmarshaller<Object>
Interface for an object that canread its data
from structured formats such as JSON or XML.- Since:
- 1.0.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
read(StructuredReader reader)
default UnmarshallableObject
readObject(StructuredReader reader)
ATTENTION: This object will be modified such that the read data will be applied.
-
-
-
Method Detail
-
readObject
default UnmarshallableObject readObject(StructuredReader reader)
ATTENTION: This object will be modified such that the read data will be applied. For complex objects (e.g. beans with multiple properties) those properties not defined in the data that is read will not be overwritten. In order to get a clean representation of the data from the given reader you should invoke this method on an empty object.- Specified by:
readObject
in interfaceUnmarshaller<Object>
- Parameters:
reader
- theStructuredReader
where to read the data from.- Returns:
- the unmarhsalled or de-serialized object. If this is an instance of
UnmarshallableObject
then the called instance is modified by filling in the unmarshalled data and will return itself. - See Also:
read(StructuredReader)
-
read
void read(StructuredReader reader)
- Parameters:
reader
- theStructuredReader
where to read the data from. This object will be modified such that the read data will be applied. For complex objects (e.g. beans with multiple properties) those properties not defined in the data that is read will not be overwritten. In order to get a clean representation of the data from the given reader you should invoke this method on an empty object.
-
-