0

下面是我试图保存在 Realm DB 中的对象,其中 Student 将是 RealmObject。我希望将以下模型中的 MyCustomObj 成员保存为 JSON 对象,并将以下模型中的 OList 成员保存为对象数组。

public class Student:RealmObject
    {
        [JsonProperty]
        [PrimaryKey]

        public int StudentID { get; set; }
        [JsonProperty]
        public string StudentName { get; set; }

        [JsonProperty]
        public MyCustomObj MyCustomObj { get; set; }

        [JsonProperty]
        public IList<OptionItems> OList { get;  }
    }
4

0 回答 0