Skip to content

chzyer-other/msgpack-for-android

Repository files navigation

MessagePack for Android

MessagePack Homepage
test successed with python.

Feature

  1. supports int, long, String, Boolean, array, hashtable
  2. able to custom array and hashtable(implements IDictPicker or IListPicker)

How to use

  1. Modify the package name(default: org.chenye.andfree.msgpack)
  2. Implements data structures(list, dict)
  3. Configure MsgPackUnpack
      	//structure
      	class Line implements IDictPicker, IListPicker{
      	
      	}
      	
      	//configure
      	MsgPackUnpack.setGetDict(new IGetDictPicker() {
			
			@Override
			public IDictPicker ret() {
				// TODO Auto-generated method stub
				return new Line();
			}
		});
		MsgPackUnpack.setGetList(new IGetListPicker() {
			
			@Override
			public IListPicker ret() {
				// TODO Auto-generated method stub
				return new Line();
			}
		});
  1. pack or unpack
	      ByteBuffer bb = MsgPack.pack(Object obj);
    	  Object obj = MsgPack.unpack(byte[] bytes);

About

[SDK] MessagePack for android

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages