From be4d337f679fc1754523b915d54004b9712928f8 Mon Sep 17 00:00:00 2001 From: Pierre-Yves FARE Date: Wed, 22 Jun 2022 22:26:43 +0100 Subject: [PATCH] Mention default values of serialization options in readme. fix #367 --- readme.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index 7ff3b591..98e3ed01 100644 --- a/readme.md +++ b/readme.md @@ -179,8 +179,9 @@ All API methods that support passing objects of user-specified data types have a The options are passed as an instance of the `ApiClientSerializationOptions` class, which contains options for: -- `boolean UseCamelCasePropertyNames` -- `boolean IgnoreNullValues` +- `UseCamelCasePropertyNames` (boolean, default is `false`) +- `IgnoreNullValues` (boolean, default is `true`) +- `UseStringEnumConversion` (boolean, default is `false`) In addition, the default options can be updated, which will affect all subsequent operations that use these options. To set default options, set them on the serializer implementation itself. For example, if using the supplied `JsonNetApiClientSerialization`: @@ -189,6 +190,8 @@ var serializer = new JsonNetApiClientSerialization(); serializer.DefaultOptions.IgnoreNullValues = false; ``` +Note: the default values were chosen in line with Json.NET default values as it is the default serializer. + ### HTTP Request Headers APIs that support specifying HTTP request headers have an optional method argument to pass in header values.