peteroupc / CBOR

A C# implementation of Concise Binary Object Representation (RFC 8949).
The Unlicense
206 stars 29 forks source link

Missing attribute to change name of the properties #43

Closed ondrejtomcik closed 4 years ago

ondrejtomcik commented 4 years ago

Greetings, I would like to ask if there is plan, or already a solution (which I unfortunately didn't find) to introduce attribute which allow change of the source property name. Same thing you have for example in JSON.Net - https://www.newtonsoft.com/json/help/html/JsonPropertyName.htm

The example how we currently work with the library is: CBORObject.DecodeFromBytes(data).ToObject(typeof(T), new PODOptions(false, true));

Thanks

peteroupc commented 4 years ago

Declining. In general, plain-old-data types that should be serialized with CBORObject should be those within the application's control. As such, the application should already have full control of what names each of its properties should have.