-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System.Text.Json fixes #876
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 1 change requests, 0 of 1 approvals obtained (waiting on @andrewheumann)
Elements/src/Serialization/JSON/ElementConverter.cs
line 115 at r1 (raw file):
{ // This may occur if the object is a proxy of a type we don't have the class for. Fallback to `Element`. genericType = typeof(Element);
Very nice.
Elements.CodeGeneration/src/HyparFilters.cs
line 56 at r1 (raw file):
/// Strip the nullable annotation (?) from a type. /// </summary> public static string Removenull(string input)
Do we use this in this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 1 change requests, 0 of 1 approvals obtained (waiting on @ikeough)
Elements/src/Serialization/JSON/ElementConverter.cs
line 115 at r1 (raw file):
Previously, ikeough (Ian Keough) wrote…
Very nice.
Done.
Elements.CodeGeneration/src/HyparFilters.cs
line 56 at r1 (raw file):
Previously, ikeough (Ian Keough) wrote…
Do we use this in this PR?
Ah, good catch — I was using it, but now it's no longer needed with the third-party Enum converter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 1 of 1 approvals obtained
BACKGROUND:
DESCRIPTION:
enum
code generation — STJ'sJsonStringEnumConverter
ignores[EnumMember]
attributes, which means JSON from hypar containing enums was frequently failing to deserialize and not serializing with the correct member names. theJsonStringEnumConverter
is replaced withMacross.Json.Extensions
'sJsonStringEnumMemberConverter
.ProxyElement
s of types that were not loaded was throwing an exception.TESTING:
This change is