-
Notifications
You must be signed in to change notification settings - Fork 161
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
fixes #580 #978
base: release-8.x
Are you sure you want to change the base?
fixes #580 #978
Conversation
@microsoft-github-policy-service agree |
@@ -39,7 +39,9 @@ public override JsonConverter CreateConverter(Type type, JsonSerializerOptions o | |||
|
|||
if (generaticType == typeof(PageResult<>)) | |||
{ | |||
return (JsonConverter)Activator.CreateInstance(typeof(PageResultConverter<>).MakeGenericType(new Type[] { entityType })); | |||
return (JsonConverter)Activator.CreateInstance( |
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.
do the same thing for Newtonsoft.JSON.OData project class?
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.
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.
I believe the protocol expects these to be lower camel case. If so, changing this would be non-compliant.
Which protocol? |
@mikepizzo I might be wrong but I think that the Thank you @mirgil for you contribution. Could you please add tests to validate the changes? |
Please provide a description of the problem and how this fixes it in the pr description. |
public override PageResult<TEntity> Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) | ||
{ | ||
Contract.Assert(false, "PageResult{TEntity} should never be deserialized into"); | ||
throw new NotImplementedException(); | ||
} | ||
|
||
private string GetConvertedName(string name) | ||
{ | ||
if (_namingPolicy == null) |
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.
if (_namingPolicy == null)
{
return name;
}
return _namingPolicy.ConvertName(name);
Could we have some tests for the new functionality ? |
No description provided.