msgpack / msgpack-cli

MessagePack implementation for Common Language Infrastructure / msgpack.org[C#]
http://msgpack.org
Apache License 2.0
834 stars 175 forks source link

MessagePackObject does not support decimal/float conversion #225

Open itaign opened 7 years ago

itaign commented 7 years ago

Is there a reason that MessagePackObject does not support AsDecimal/AsFloat conversion like it does for the rest of the value types?

yfakariya commented 7 years ago

Good question.

  1. There is AsSingle instead of AsFloat because float is C# keyword rather than CLS compliant type name.
  2. MessagePackObject represents one of types of native msgpack types (https://github.com/msgpack/msgpack/blob/master/spec.md). decimal is not "native" type of message pack.