MessagePackKnownDictionaryKeyTypeAttribute Class |
Marks that the runtime type of keys of this dictionary should be encoded with closed type codes for polymorphism.
Inheritance Hierarchy
Namespace: MsgPack.SerializationAssembly: MsgPack (in MsgPack.dll) Version: 0.6.0
Syntax [AttributeUsageAttribute(AttributeTargets.Property|AttributeTargets.Field, AllowMultiple = true)]
public sealed class MessagePackKnownDictionaryKeyTypeAttribute : Attribute
<AttributeUsageAttribute(AttributeTargets.Property Or AttributeTargets.Field, AllowMultiple := true)>
Public NotInheritable Class MessagePackKnownDictionaryKeyTypeAttribute
Inherits Attribute
[AttributeUsageAttribute(AttributeTargets::Property|AttributeTargets::Field, AllowMultiple = true)]
public ref class MessagePackKnownDictionaryKeyTypeAttribute sealed : public Attribute
[<SealedAttribute>]
[<AttributeUsageAttribute(AttributeTargets.Property|AttributeTargets.Field, AllowMultiple = true)>]
type MessagePackKnownDictionaryKeyTypeAttribute =
class
inherit Attribute
end
The MessagePackKnownDictionaryKeyTypeAttribute type exposes the following members.
Constructors Properties Remarks
When you apply this attribute to a member, the keys of the dictionary
will be serialized as 2 element array as [ <type-code>, <actual-value (array or map)>] format
where the type-code is utf-8 encoded string representing type in your application (system) context.
When you interop with other launages, the deserializer will be able to deserialize object which is actual type when serialized with interoperability.
Note |
---|
You must use one-to-one relationship between type-code and the type.
|
See Also