Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 9c4b9da

Browse files
committed
Update README.md
1 parent 02eba76 commit 9c4b9da

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ All C# boolean and numeric data types are stored as-is without quotes.
318318
For the most compact output null values are omitted from the serialized by default. If you want to include null values set the global configuration:
319319

320320
```csharp
321-
JsConfig.IncludeNullValues = true;
321+
JsConfig.Init(new Config { IncludeNullValues = true });
322322
```
323323

324324
### string type
@@ -481,6 +481,16 @@ JsConfig<TimeSpan>.SerializeFn = time =>
481481
(time.Ticks < 0 ? "-" : "") + time.ToString("hh':'mm':'ss'.'fffffff");
482482
```
483483

484+
## Strict Parsing
485+
486+
By default ServiceStack Serializers will try to deserialize as much as possible without error, if you prefer you can opt-in to stricter parsing with:
487+
488+
```csharp
489+
Env.StrictMode = true;
490+
```
491+
492+
Where it will fail fast and throw Exceptions on deserialization errors.
493+
484494
## Custom Serialization
485495

486496
Although JsonSerializer is optimized for serializing .NET POCO types, it still provides some options to change the convention-based serialization routine.

0 commit comments

Comments
 (0)