Skip to content

Commit d511a44

Browse files
robertlysonHavret
authored andcommitted
Update README.md
1 parent 5ef263b commit d511a44

1 file changed

Lines changed: 1 addition & 11 deletions

File tree

README.md

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,10 @@ To enable Protobuf support you need to register it on `JsonSerializerOptions`:
2121

2222
```csharp
2323
var jsonSerializerOptions = new JsonSerializerOptions();
24-
jsonSerializerOptions.PropertyNamingPolicy = new JsonLowerCaseNamingPolicy();
24+
jsonSerializerOptions.PropertyNamingPolicy = JsonNamingPolicy.CamelCase;
2525
jsonSerializerOptions.AddProtobufSupport();
2626
```
2727

28-
```csharp
29-
private class JsonLowerCaseNamingPolicy : JsonNamingPolicy
30-
{
31-
public override string ConvertName(string name)
32-
{
33-
return name.ToLower();
34-
}
35-
}
36-
```
37-
3828
You need to pass the options each time you want to serialize:
3929

4030
```csharp

0 commit comments

Comments
 (0)