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.
- Host: GitHub
- URL: https://github.com/oskar11120/messagepackcsharp.camelcase
- Owner: oskar11120
- License: mit
- Created: 2024-08-10T15:56:35.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-08-11T14:51:17.000Z (almost 2 years ago)
- Last Synced: 2024-11-12T21:49:30.104Z (over 1 year ago)
- Topics: c-sharp, camel, camel-case, camelcase, csharp, dotnet, dotnet8, messagepack, msgpack, serialization, serializer
- Language: C#
- Homepage: https://www.nuget.org/packages/MessagePack.CamelCase
- Size: 43.9 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
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`.