سؤال

I need lowercase_underscore_names for my REST client.

JsConfig.EmitLowercaseUnderscoreNames setting works fine only for serialization (JSON).

Now I use DataContract and DataMember attributes to deserialize my models correctly.

But is there any generic way to achieve this?

هل كانت مفيدة؟

المحلول

JsConfig.PropertyConvention = JsonPropertyConvention.Lenient;

The answer.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top