A dynamic serializer/deserializer for Thrift
Java
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
src
.gitignore
README
TODO
pom.xml
swift.iml
swift.ipr

README

==== Usage

1. Deserializing from TProtocol into a Map<String, ?>

StructureType type = ...;
TProtocol protocol = ...;

Deserializer deserializer = new Deserializer();
deserializer.bindToMap(type);

Map<String, ?> map = deserializer.deserialize(type.getName(), protocol);


2. Deserializing from TProtocol into a Javabean

StructureType type = ...;
TProtocol protocol = ...;

Deserializer deserializer = new Deserializer();
deserializer.bind(type, Bean.clas);

Bean bean = deserializer.deserialize(type.getName(), protocol);


==== Building

Before building, install thrift into your local maven repository:

mvn install:install-file -Dfile=lib/thrift-20090716.jar -DgroupId=org.apache.thrift -DartifactId=thrift -Dversion=20090716 -Dpackaging=jar