You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: samples/Samples/Sample01_BasicUsage.cs
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -76,6 +76,7 @@ public void SerializeThenDeserialize()
76
76
}
77
77
}
78
78
79
+
// Note: If you want to interop with other platform using SerializationMethod.Array (default), you should use [MessagePackMember]. See Sample06 for details.
Copy file name to clipboardExpand all lines: samples/Samples/Sample06_CustomAttributes.cs
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ namespace Samples
30
30
publicclassMessagePackMemberSample
31
31
{
32
32
[MessagePackMember(
33
-
0,// Specify 0 based index for serialized array.
33
+
0,// Specify 0 based index for serialized array. You should specify this value to ensure interoperability with other platform bindings.
34
34
NilImplication=NilImplication.MemberDefault// Specify the behavior when unpacked value is nil -- default is Null for reference types (set null), Prohibit for value types (throw exception).
35
35
)]
36
36
publiclongFileId{get;set;}
@@ -49,7 +49,7 @@ public class MessagePackMemberSample
49
49
// ... Or you can use DataMemberAttribute for compabitility among other libraries.
50
50
publicclassDataContractSample
51
51
{
52
-
[DataMember(Name="Id",Order=1)]
52
+
[DataMember(Name="Id",Order=1)]// Order can be used to interop too.
53
53
publiclongId{get;set;}
54
54
55
55
[DataMember(Name="Title",Order=2)]
@@ -62,7 +62,7 @@ public class DataContractSample
62
62
63
63
namespaceSystem.Runtime.Serialization
64
64
{
65
-
// Tips: You don't have to refer System.Runtime.Serialization assembly
65
+
// Tips: You don't have to refer System.Runtime.Serialization assembly. MessagePack for CLI just see Type.FullName.
0 commit comments