Is it possible to json-serialize a class with explicitly implemented interface properties?

Viewed 669
interface A { string Name {get;set;}}

interface B { string Name {get;set;}}

class C : A, B { string A.Name {get;set;} string B.Name {get;set;}}

var c = new C();
((A)c).Name = "a";
((B)c).Name = "b";

var s = JsonConvert.SerializeObject(c);

The result is an empty json object with no property values. Is it possible to serialize and deserialize such an object?

1 Answers
Related