We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
string strJson = "{"ID": 3,"Weight":[{"ID": 1,"Weight": 24},{"ID": 2,"Weight": 33}]}"; var jd = JsonMapper.ToObject(strJson); JsonData nd = new JsonData(); nd["ID"]=3; nd["Weight"]=17; jd["Weight"].Add(nd); Console.Write(jd["Weight"].ToJson()); Console.Write(jd.ToJson());
string strJson = "{"ID": 3,"Weight":[{"ID": 1,"Weight": 24},{"ID": 2,"Weight": 33}]}";
var jd = JsonMapper.ToObject(strJson);
JsonData nd = new JsonData();
nd["ID"]=3;
nd["Weight"]=17;
jd["Weight"].Add(nd);
Console.Write(jd["Weight"].ToJson());
Console.Write(jd.ToJson());
The first output is right, but the second output jd.ToJson() not include nd
jd.ToJson()
nd
The text was updated successfully, but these errors were encountered:
temporary plan: ... jd["Weight"].Add(nd); jd["Weight"]=jd["Weight"]; ...
...
jd["Weight"]=jd["Weight"];
Then output is ok, but that plan is... ugly...
Sorry, something went wrong.
No branches or pull requests
string strJson = "{"ID": 3,"Weight":[{"ID": 1,"Weight": 24},{"ID": 2,"Weight": 33}]}";
var jd = JsonMapper.ToObject(strJson);
JsonData nd = new JsonData();
nd["ID"]=3;
nd["Weight"]=17;
jd["Weight"].Add(nd);
Console.Write(jd["Weight"].ToJson());
Console.Write(jd.ToJson());
The first output is right, but the second output
jd.ToJson()
not includend
The text was updated successfully, but these errors were encountered: