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
{{ message }}
Repository navigation
[C#] Properties are escaped with _, which causes deserialization to fail #12757
The C# codegen renames error_message to ErrorMessage to be consistent with codestyle.
Due to this rename, the member now conflicts with the class name, so it again renames it to _ErrorMessage.
So far so good.
The problem is then that this rename is not properly applied to all the relevant names.
Newtonsoft.Json uses the constructor argument name to match the parameter to the property.
But in the generated code, the parameter is still named errorMessage (not _errorMessage), so the parameter is left as the default value null and not deserialized:
[DataContract]internalpartialclassErrorMessage:IEquatable<ErrorMessage>{publicErrorMessage(stringerrorId=default(string),stringerrorMessage=default(string),stringadditionalDetails=default(string)){// Removed for brevity}[DataMember(Name="error_id",EmitDefaultValue=false)]publicstringErrorId{get;set;}[DataMember(Name="error_message",EmitDefaultValue=false)]publicstring_ErrorMessage{get;set;}
Activity