From 4c1a6c3b26b68a864669b1d3a9bf6b503eceb553 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Wed, 23 Nov 2022 15:28:18 -0500 Subject: [PATCH] - fixes code snippet missing curly braces --- README.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index e0f165b..703cebf 100644 --- a/README.md +++ b/README.md @@ -12,14 +12,15 @@ From v4 onwards we use the default the `JsonSerializerOptions` for `System.Text. To retain the old settings use the following configuration when adding Blazored SessionStorage to the DI container: ```csharp -builder.Services.AddBlazoredSessionStorage(config => - config.JsonSerializerOptions.DictionaryKeyPolicy = JsonNamingPolicy.CamelCase; - config.JsonSerializerOptions.IgnoreNullValues = true; - config.JsonSerializerOptions.IgnoreReadOnlyProperties = true; - config.JsonSerializerOptions.PropertyNameCaseInsensitive = true; - config.JsonSerializerOptions.PropertyNamingPolicy = JsonNamingPolicy.CamelCase; - config.JsonSerializerOptions.ReadCommentHandling = JsonCommentHandling.Skip; - config.JsonSerializerOptions.WriteIndented = false; +builder.Services.AddBlazoredSessionStorage(config => { + config.JsonSerializerOptions.DictionaryKeyPolicy = JsonNamingPolicy.CamelCase; + config.JsonSerializerOptions.IgnoreNullValues = true; + config.JsonSerializerOptions.IgnoreReadOnlyProperties = true; + config.JsonSerializerOptions.PropertyNameCaseInsensitive = true; + config.JsonSerializerOptions.PropertyNamingPolicy = JsonNamingPolicy.CamelCase; + config.JsonSerializerOptions.ReadCommentHandling = JsonCommentHandling.Skip; + config.JsonSerializerOptions.WriteIndented = false; + } ); ```