Skip to content

Commit 7d2b397

Browse files
authored
Merge pull request Blazored#67 from baywet/patch-1
2 parents 0a1a428 + 4c1a6c3 commit 7d2b397

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

‎README.md‎

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@ From v4 onwards we use the default the `JsonSerializerOptions` for `System.Text.
1212
To retain the old settings use the following configuration when adding Blazored SessionStorage to the DI container:
1313

1414
```csharp
15-
builder.Services.AddBlazoredSessionStorage(config =>
16-
config.JsonSerializerOptions.DictionaryKeyPolicy = JsonNamingPolicy.CamelCase;
17-
config.JsonSerializerOptions.IgnoreNullValues = true;
18-
config.JsonSerializerOptions.IgnoreReadOnlyProperties = true;
19-
config.JsonSerializerOptions.PropertyNameCaseInsensitive = true;
20-
config.JsonSerializerOptions.PropertyNamingPolicy = JsonNamingPolicy.CamelCase;
21-
config.JsonSerializerOptions.ReadCommentHandling = JsonCommentHandling.Skip;
22-
config.JsonSerializerOptions.WriteIndented = false;
15+
builder.Services.AddBlazoredSessionStorage(config => {
16+
config.JsonSerializerOptions.DictionaryKeyPolicy = JsonNamingPolicy.CamelCase;
17+
config.JsonSerializerOptions.IgnoreNullValues = true;
18+
config.JsonSerializerOptions.IgnoreReadOnlyProperties = true;
19+
config.JsonSerializerOptions.PropertyNameCaseInsensitive = true;
20+
config.JsonSerializerOptions.PropertyNamingPolicy = JsonNamingPolicy.CamelCase;
21+
config.JsonSerializerOptions.ReadCommentHandling = JsonCommentHandling.Skip;
22+
config.JsonSerializerOptions.WriteIndented = false;
23+
}
2324
);
2425
```
2526

0 commit comments

Comments
 (0)