You should use ExpandoObjectConverter
instead.
You need to type your IDictionary<string, object>
as just dynamic
and decorate the whole property with [JsonConverter(typeof(ExpandoObjectConverter))]
.
One interesting detail is ExpandoObject
also implements IDictionary<string, object>
, but when you type it with dynamic
, you can access associated properties like regular ones! ;)