Skip to content

Commit bbdccf2

Browse files
committed
Field casing deserialization
Relates: #3900 Add a note to the breaking changes about field casing during deserialization.
1 parent 82409ab commit bbdccf2

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

docs/7.0-breaking-changes/elasticsearch-net-breaking-changes.asciidoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ e.g. UWP, Xamarin.iOS, Xamarin.Android.
4040
SimpleJson deserialized JSON arrays to `object[]`, but Utf8Json deserializes them to `List<object>`.
4141
This change is preferred for allocation and performance reasons.
4242

43+
* Utf8Json is much stricter when deserializing JSON object field names to C#
44+
https://en.wikipedia.org/wiki/Plain_old_CLR_object[POCO] properties. With the internal Json.NET serializer
45+
in 6.x, JSON object field names would attempt to be matched with C# POCO property names first by an exact
46+
match, falling back to a case insensitive match. With Utf8Json in 7.x however, JSON object field names must
47+
match exactly the name configured for the C# POCO property name.
48+
4349
[float]
4450
=== `Response.Success` semantics
4551

docs/7.0-breaking-changes/nest-breaking-changes.asciidoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ With the current implementation of serialization with Utf8Json, this approach wi
4747
serializing types that it sees. `Reflection.Emit` is not supported on all platforms
4848
e.g. UWP, Xamarin.iOS, Xamarin.Android.
4949

50+
* Utf8Json is much stricter when deserializing JSON object field names to C#
51+
https://en.wikipedia.org/wiki/Plain_old_CLR_object[POCO] properties. With the internal Json.NET serializer
52+
in 6.x, JSON object field names would attempt to be matched with C# POCO property names first by an exact
53+
match, falling back to a case insensitive match. With Utf8Json in 7.x however, JSON object field names must
54+
match exactly the name configured for the C# POCO property name.
55+
5056
[float]
5157
=== High to Low level client dispatch changes
5258

0 commit comments

Comments
 (0)