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

Commit 3434a7d

Browse files
committed
Update README.md
1 parent c8c5c50 commit 3434a7d

File tree

1 file changed

+5
-19
lines changed

1 file changed

+5
-19
lines changed

README.md

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,7 @@ The JSON/JSV and CSV serialization can be customized globally by configuring the
366366
JsConfig.Init(new Config {
367367
DateHandler = DateHandler.ISO8601,
368368
AlwaysUseUtc = true,
369-
EmitLowercaseUnderscoreNames = false,
370-
EmitCamelCaseNames = false,
369+
TextCase = TextCase.CamelCase,
371370
ExcludeDefaultValues = true,
372371
});
373372
```
@@ -437,30 +436,17 @@ using property initializers:
437436

438437
```csharp
439438
using (JsConfig.With(new Config {
440-
EmitLowercaseUnderscoreNames = true,
441-
EmitCamelCaseNames = false,
442-
PropertyConvention = PropertyConvention.Lenient))
439+
TextCase == TextCase.CamelCase,
440+
PropertyConvention = PropertyConvention.Lenient
441+
}))
443442
{
444443
return text.FromJson<T>();
445444
}
446445
```
447446

448-
Or if preferred you use `JsConfig.BeginScope()` to populate scoped configuration properties individually:
449-
450-
```csharp
451-
using (var scope = JsConfig.BeginScope())
452-
{
453-
scope.EmitLowercaseUnderscoreNames = true;
454-
scope.EmitCamelCaseNames = false;
455-
scope.PropertyConvention = PropertyConvention.Lenient;
456-
457-
return text.FromJson<T>();
458-
}
459-
```
460-
461447
#### Create Custom Scopes using String config
462448

463-
You can also create a custion config scope from a string manually using `JsConfig.CreateScope()` where you can use the full config name or their aliases, e.g:
449+
You can also create a custom config scope from a string manually using `JsConfig.CreateScope()` where you can use the full config name or their aliases, e.g:
464450

465451
```csharp
466452
using (JsConfig.CreateScope("EmitLowercaseUnderscoreNames,EDV,dh:ut"))

0 commit comments

Comments
 (0)