import org.msgpack.MessagePack; import org.msgpack.template.Template; import org.msgpack.template.Templates; public class MessagePackExample { public static void main(String[] args) throws Exception { MessagePack messagePack = new MessagePack(); Person person = new Person("Alice", 25); byte[] serialized = messagePack.write(person); Person deserialized = messagePack.read(serialized, Person.class); } } class Person { private String name; private int age; public Person() {} }


上一篇:
下一篇:
切换中文