-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Correctly deserialize JoinField #3357
Conversation
When the join field is a string and using JsonNetSerializer, the string conversion should not emit the surrounding double quotes Closes #3356
[U] | ||
public void JoinFieldDeserializedCorrectly() | ||
{ | ||
var pool = new SingleNodeConnectionPool(new Uri("http://localhost:9200")); |
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.
LGTM small suggestion though is to use the recently centralized json serialization assertions.
var tester = SerializationTester.DefaultWithSourceSerializer;
var response = tester.Client.IndexDocument(doc);
tester.AssertSerialize(response.ApiCall.RequestBodyInBytes, new { join = "parent" });
var doc = tester.AssertDeserialize<MyDocument>(response.ApiCall.RequestBodyInBytes);
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.
SerializationTester.DefaultWithSourceSerializer;
Would need to be added though
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.
Could even use only AssertRoundTrip<MyDocument>()
rather than AssertSerialize
and AssertDeserialize
separately
Update following PR
When the join field is a string and using JsonNetSerializer, the string
conversion should not emit the surrounding double quotes
Closes #3356