Replies: 3 comments
-
it seems like the error is occurring when attempting to use the DynamicMethod constructor in the System.Reflection.Emit namespace, which is not supported on certain platforms, such as iOS and some versions of Linux |
Beta Was this translation helpful? Give feedback.
-
that's why i still use newtonjson |
Beta Was this translation helpful? Give feedback.
-
You can overload |
Beta Was this translation helpful? Give feedback.
-
I catch this error when send message
Error | failed to write message to <ServerAddress>: System.PlatformNotSupportedException: Operation is not supported on this platform. at System.Reflection.Emit.DynamicMethod..ctor (System.String name, System.Type returnType, System.Type[] parameterTypes, System.Reflection.Module m, System.Boolean skipVisibility) [0x00000] in <00000000000000000000000000000000>:0 at System.Text.Json.Serialization.Metadata.ReflectionEmitMemberAccessor.CreateConstructor (System.Type type) [0x00000] in <00000000000000000000000000000000>:0 at System.Text.Json.Serialization.Metadata.ReflectionEmitCachingMemberAccessor+Cache
1+<>c__DisplayClass6_01[TKey,TValue].<GetOrAdd>b__0 (TKey key) [0x00000] in <00000000000000000000000000000000>:0 at System.Collections.Concurrent.ConcurrentDictionary
2[TKey,TValue].GetOrAdd (TKey key, System.Func2[T,TResult] valueFactory) [0x00000] in <00000000000000000000000000000000>:0 at System.Text.Json.Serialization.Metadata.ReflectionEmitCachingMemberAccessor+Cache
1[TKey].GetOrAdd[TValue] (TKey key, System.Func2[T,TResult] valueFactory) [0x00000] in <00000000000000000000000000000000>:0 at System.Text.Json.Serialization.Metadata.ReflectionEmitCachingMemberAccessor.CreateConstructor (System.Type classType) [0x00000] in <00000000000000000000000000000000>:0 at System.Text.Json.Serialization.Metadata.ReflectionJsonTypeInfo
1[T]..ctor (System.Text.Json.Serialization.JsonConverter converter, System.Text.Json.JsonSerializerOptions options) [0x00000] in <00000000000000000000000000000000>:0at System.Text.Json.Serialization.JsonConverter
1[T].CreateReflectionJsonTypeInfo (System.Text.Json.JsonSerializerOptions options) [0x00000] in <00000000000000000000000000000000>:0 at System.Text.Json.Serialization.Metadata.DefaultJsonTypeInfoResolver.GetTypeInfo (System.Type type, System.Text.Json.JsonSerializerOptions options) [0x00000] in <00000000000000000000000000000000>:0 at System.Text.Json.JsonSerializerOptions.GetTypeInfoNoCaching (System.Type type) [0x00000] in <00000000000000000000000000000000>:0
Beta Was this translation helpful? Give feedback.
All reactions