c# - How to add a json array into a property of a JObject with json.net -
i having difficulty figuring out how add array of json objects existing jobject
. have jobject
"modified" property, , want add property "intersectgroups" contains array of json objects, how can this? have jobject[]
when serialize in format require, looking this: mainjobject.add("intersectgroups", myjobjectarray)
here example of final json want when serialize it.
... "modified": "2012-11-26t10:21:04.693", "intersectgroups": [ { "id": 1004, "userid": 20003, "groupid": 1001, "admin": false, "expires": "1900-01-01t00:00:00" }, { "id": 1003, "userid": 20003, "groupid": 1000, "admin": false, "expires": "1900-01-01t00:00:00" } ] ...
update
my final solution use jarray object. jarray jcontainer, jtoken, can add jobject. problem was trying use jobject[], not valid jtoken
my final solution use jarray
object. jarray
jcontainer
, jtoken
, can add jobject
. problem was trying use jobject[]
, not valid jtoken
Comments
Post a Comment