c# - Partially deserialize with JSON.NET, keeping some fields raw -
i have document this
{ "field1": 1, "field2": 2, "field3": { type: "themotherload" } }
which want convert class, keeping field 3 "raw/as-is".
public class fields { public int field1 { get; set; } public int field2 { get; set; } public string field3 { get; set; } }
the result should
field1 = 1, field2 = 2, field3 = "{ type: "themotherload" }"
possible json.net?
field3 jobject. when need json call field3.tostring()
Comments
Post a Comment