An open API service indexing awesome lists of open source software.

https://github.com/oskar11120/messagepackcsharp.camelcase

Camel case support for MessagePack.
https://github.com/oskar11120/messagepackcsharp.camelcase

c-sharp camel camel-case camelcase csharp dotnet dotnet8 messagepack msgpack serialization serializer

Last synced: 3 months ago
JSON representation

Camel case support for MessagePack.

Awesome Lists containing this project

README

          

# Camel case support for [MessagePack](https://github.com/MessagePack-CSharp/MessagePack-CSharp).
1. Contractless camel case serialization of properties to MessagePack map keys.
2. Dynamic serialization of enum values to string literals using [MessagePack](https://github.com/MessagePack-CSharp/MessagePack-CSharp)'s `DynamicEnumAsStringResolver`.
3. Dynamic case insensitive deserialization of MessagePack map keys and of string literals to Enum values.

Made to match naming conventions of [System.Text.Json.JsonSerializerDefaults.Web](https://learn.microsoft.com/en-us/dotnet/api/system.text.json.jsonserializerdefaults?view=net-8.0).

## Api
Use:
- `CamelCaseContractlessFormatterResolver.Instance` for all the features,
- `CamelCaseAllowingDynamicEnumAsStringFormatter.Instance` for just enums,
- `CamelCaseContractlessMapFormatter.Instance` for just maps.

`Formatter.Instance` are `null` where `T` is not suitable for use with given `Formatter`.