I am trying to write simple Json Array.
I m bit rusty with this Json as I have just started learning it with Vb.Net and Using NewtonSoft.Json Library
Sorry if there is something wrong in question. As I said that I just started Json so please advice to rectify.
Old Json:
[{
"YEAR": "2018-2019",
"COMPNO": "1",
"TYPE": "SAL",
"Field1": false
},
{
"YEAR": "2018-2019",
"COMPNO": "2",
"TYPE": "PUR",
"Field1": false
}]
I want a field to add in the object like
New Json:
[{
"YEAR": "2018-2019",
"COMPNO": "1",
"TYPE": "SAL",
"Field1": false,
"Field2": false '-----------------------Something Like this
},
{
"YEAR": "2018-2019",
"COMPNO": "2",
"TYPE": "PUR",
"Field1": false,
"Field2": false '--------------In every object if possible.
}]
My Json is simple without groups.
I know how to add a new Object inside the Jarray but I want to add a field
How can I achieve this task?
P.S I am using Newtonsoft.JSON libraries.
"Field1": falseand"Field2": false, that's a vaid JSON. Are you asking how to modify the JSON or the classes that store/handle it?