-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Adds more write overloads to Utf8Json #4209
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
Changes from 1 commit
de62914
fc289b1
ffc4e46
f365b30
b07e0a8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
using Elasticsearch.Net.Utf8Json; | ||
|
||
namespace Elasticsearch.Net | ||
namespace Elasticsearch.Net | ||
{ | ||
internal interface IInternalSerializer | ||
{ | ||
bool TryGetJsonFormatter(out IJsonFormatterResolver formatterResolver); | ||
} | ||
|
||
internal interface IInternalSerializerWithFormatter | ||
{ | ||
IJsonFormatterResolver FormatterResolver { get; } | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,13 @@ public void Serialize(ref JsonWriter writer, IBulkRequest value, IJsonFormatterR | |
if (body == null) | ||
continue; | ||
|
||
if (op.Operation == "update" || body is ILazyDocument) | ||
{ | ||
var requestResponseSerializer = settings.RequestResponseSerializer; | ||
requestResponseSerializer.SerializeUsingWriter(ref writer, body, settings, SerializationFormatting.None); | ||
return; | ||
} | ||
|
||
SourceWriter.Serialize(ref writer, body, formatterResolver); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks like a behavioural change? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The behavioural change looks like the Before, the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ahh you are right, will address! |
||
writer.WriteRaw(Newline); | ||
} | ||
|
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.
Does
DiagnosticsSerializerProxy
still need to implementIInternalSerializerWithFormatter
?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.
Remove it instead since its internal