Hey all I am trying to output more than one JSON output value. In XML it would look like this:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<EmployeeInformation>
<EmployeeInfo>
<lastName>Bob</lastName>
<firstName>Barker</firstName>
<eMail>[email protected]</eMail>
<badgeID>760013224</badgeID>
</EmployeeInfo>
<EmployeeInfo>
<lastName>John</lastName>
<firstName>Doe</firstName>
<eMail>[email protected]</eMail>
<badgeID>0162000037467</badgeID>
</EmployeeInfo>
</EmployeeInformation>
I would like to follow that same structure in JSON. However, I currently only am getting this output:
{
"lastName": "Barker",
"firstName": "Bob",
"eMail": "[email protected]",
"badgeID": "760013224",
}{
"lastName": "Doe",
"firstName": "John",
"eMail": "[email protected]",
"badgeID": "0162000037467",
}
From this code here:
Dim json As String = ""
empInfo.firstName = "Bob"
empInfo.lastName = "Barker"
empInfo.eMail = "[email protected]"
empInfo.badgeID = "760013224"
json = JsonConvert.SerializeObject(empInfo, Formatting.Indented)
empInfo.firstName = "John"
empInfo.lastName = "Doe"
empInfo.eMail = "[email protected]"
empInfo.badgeID = "0162000037467"
json &= JsonConvert.SerializeObject(empInfo, Formatting.Indented)
So how would I go about making it structured as it is in XML using JSON.net?