Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [JsonObject(MemberSerialization.OptIn)]
- public interface INode {
- }
- [JsonObject(MemberSerialization.OptIn)]
- public class BinaryTree : INode {
- [JsonProperty]
- public INode left;
- [JsonProperty]
- public INode right;
- }
- [JsonObject(MemberSerialization.OptIn)]
- public class LeafNode1 : INode {
- [JsonProperty]
- public int A;
- }
- [JsonObject(MemberSerialization.OptIn)]
- public class LeafNode2 : INode {
- [JsonProperty]
- public bool B;
- }
- [JsonObject(MemberSerialization.OptIn)]
- public class InterfaceDemoBehavior : BaseBehavior {
- [JsonProperty]
- public INode MyTree;
- }
Advertisement
Add Comment
Please, Sign In to add comment