add post serialization in java