io.github.mmm.marshall.Unmarshaller Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mmm-marshall Show documentation
Show all versions of mmm-marshall Show documentation
API for marshalling and unmarshalling data.
The newest version!
/* Copyright (c) The m-m-m Team, Licensed under the Apache License, Version 2.0
* http://www.apache.org/licenses/LICENSE-2.0 */
package io.github.mmm.marshall;
/**
* Interface for an unmarshaller that can {@link #readObject(StructuredReader) read} (unmarshall or de-serialize) an
* object from structured formats such as JSON or XML.
*
* @param type of the object to {@link #readObject(StructuredReader) read}.
* @since 1.0.0
* @see Marshaller
* @see UnmarshallableObject
*/
public interface Unmarshaller {
/**
* @param reader the {@link StructuredReader} where to read the data from.
* @return the unmarhsalled or de-serialized object. If this is an instance of {@link UnmarshallableObject} then the
* called instance is modified by filling in the unmarshalled data and will return itself.
*/
T readObject(StructuredReader reader);
}