在 Sun, 25 Apr 2010 20:20:17 +0800,Masahiro Nakagawa <[email protected]> 写道:

I release a serialization library for Phobos(D2).

Project repository: http://www.bitbucket.org/repeatedly/msgpack4d

MessagePack is a binary-based serialization spec.
See official site for details: http://msgpack.sourceforge.net/
Some application replace JSON with MessagePack for performance improvement.

msgpack4d ver 0.1.0 has an equal features with reference implementation.
  * Zero copy serialization / deserialization
  * Stream deserializer
  * Support some D features(Range, Tuple)

Currently, Phobos doesn't have a real serialization module(std.json lacks some features) I hope Phobos adopts this library for serialization(std.msgpack or std.serialization?).

I hope it can create Dynamic Object when unpack the serialized object(once the client doesn't know the exact type of the original object or no declaration is available when the compilation is done).

For example:

a plugin DLL

class Plugin{
  int plugin_state;

} // serialize this object and then send to host


Host // has no idea of the plugin's declaration

DynamicObject do = unpack(dll_serialized_buffer);

do.plugin_state  // it can be done through the opDispatch

--
使用 Opera 革命性的电子邮件客户程序: http://www.opera.com/mail/

Reply via email to