Added object conversion description.

Takatoshi Kondo
2015-04-03 14:01:53 +09:00
parent 1893b15e8b
commit 0034696841
+3 -2
@@ -20,9 +20,9 @@ When you use msgpack::unpack() function without unpack_referenc_func, msgpack::u
![Conversion](v1_1_fig_t_obj_bytes.png)
When you unpack msgpack format data, you get msgpack::object from msgpack::unpacked. Then you get various types values from msgpack::object.
When you unpack msgpack format data, you get msgpack::object from msgpack::unpacked. Then you get various types values from msgpack::object. If you want to convert to custom types from msgpack::object, see [adaptor](v1_1_cpp_adaptor#convert).
You can create an msgpack::object from a various type value using the following constructor.
You can create a msgpack::object from a various type value using the following constructor. If you want to create a msgpack::object from a custom type, see https://github.com/redboltz/msgpack-c/wiki/v1_1_cpp_adaptor#object and https://github.com/redboltz/msgpack-c/wiki/v1_1_cpp_adaptor#object_with_zone
```C++
template <typename T>
@@ -36,3 +36,4 @@ msgpack::object obj(msgpack::type::raw_ref(data, size), zone);
```
The data is NOT copied to the zone.