Skip to content

Commit d3f670d

Browse files
Update custom serialization docs (#4580) (#4587)
This commit updates the custom serialization docs that discuss using JsonNetSerializer. 1. Remove the implication that the internal serializer is based on Json.NET. 2. Include recommendation to hook up JsonNetSerializer when using Newtonsoft.Json.Linq types like JObject Co-authored-by: Russ Cam <[email protected]>
1 parent 096700a commit d3f670d

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

docs/client-concepts/high-level/serialization/custom-serialization.asciidoc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,11 @@ back to NEST's built-in serializer.
115115

116116
We ship a separate {nuget}/NEST.JsonNetSerializer[NEST.JsonNetSerializer] package that helps in composing a custom `SourceSerializer`
117117
using `Json.NET`, that is smart enough to delegate the serialization of known NEST types back to the built-in
118-
`RequestResponseSerializer`. This package is also useful if you want to control how your documents and values are stored
119-
and retrieved from Elasticsearch using `Json.NET`, without interfering with the way NEST uses `Json.NET` internally.
118+
`RequestResponseSerializer`. This package is also useful if
119+
120+
. You want to control how your documents and values are stored and retrieved from Elasticsearch using `Json.NET`
121+
122+
. You want to use `Newtonsoft.Json.Linq` types such as `JObject` within your documents
120123

121124
The easiest way to hook this custom source serializer up is as follows
122125

tests/Tests/ClientConcepts/HighLevel/Serialization/CustomSerialization.doc.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,10 @@ public class MyPercolationDocument
120120
*
121121
* We ship a separate {nuget}/NEST.JsonNetSerializer[NEST.JsonNetSerializer] package that helps in composing a custom `SourceSerializer`
122122
* using `Json.NET`, that is smart enough to delegate the serialization of known NEST types back to the built-in
123-
* `RequestResponseSerializer`. This package is also useful if you want to control how your documents and values are stored
124-
* and retrieved from Elasticsearch using `Json.NET`, without interfering with the way NEST uses `Json.NET` internally.
123+
* `RequestResponseSerializer`. This package is also useful if
124+
*
125+
* . You want to control how your documents and values are stored and retrieved from Elasticsearch using `Json.NET`
126+
* . You want to use `Newtonsoft.Json.Linq` types such as `JObject` within your documents
125127
*
126128
* The easiest way to hook this custom source serializer up is as follows
127129
*/

0 commit comments

Comments
 (0)