com.github.rschmitt.dynamicobject.FressianReadHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dynamic-object Show documentation
Show all versions of dynamic-object Show documentation
Lightweight data modeling for Java, powered by Clojure.
package com.github.rschmitt.dynamicobject;
import java.io.IOException;
import java.util.Map;
import org.fressian.Reader;
import org.fressian.handlers.ReadHandler;
public class FressianReadHandler> implements ReadHandler {
private final Class type;
public FressianReadHandler(Class type) {
this.type = type;
}
@Override
public Object read(Reader r, Object tag, int componentCount) throws IOException {
return DynamicObject.wrap((Map) r.readObject(), type).afterDeserialization();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy