Skip to content

Mention default values of serialization options in readme. #383

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

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`:

Expand All @@ -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.
Expand Down