0

Is there a way to control how dictionary keys are serialized on a per-property basis?

I have written a CamelCaseExceptDictionaryKeysResolver which makes sure all dictionary keys are serialized PascalCase for all properties in the JObject.

Any way to do this with an attribute on the specific property?

remarkpk
  • 21
  • 3
  • 1
    You could subclass your dictionary and apply `[JsonDictionary(NamingStrategyType = typeof(DefaultNamingStrategy)]` as explained [here](https://stackoverflow.com/a/43125855/3744182). Does that help? – dbc Nov 09 '17 at 00:44
  • That did exactly what I wanted. Thanks! – remarkpk Nov 09 '17 at 16:00
  • Mark as a duplicate then, or do you need a c# implementation? – dbc Nov 09 '17 at 22:25

0 Answers0