-
Notifications
You must be signed in to change notification settings - Fork 47
Reading JSON or XML
olmelabs edited this page Nov 29, 2017
·
1 revision
string json = @"{
'Type': 'M',
'Name': 'M_940',
'Content': [{
'Type': 'S',
'Name': 'W05',
'Content': [ { 'E': 'N' }, { 'E': '538686' }, { 'E': '' }, { 'E': '001001' }, { 'E': '538686' }]
}]
}";
M_940 map = new M_940();
JsonMapReader r = new JsonMapReader(map);
EdiTrans t = r.ReadToEnd(json);
string xml = @"<EdiTrans>
<Name>M_940</Name>
<Content>
<EdiSegment>
<Name>W05</Name>
<Content>
<E>N</E>
<E>538686</E>
<E />
<E>001001</E>
<E>538686</E>
</Content>
</EdiSegment>
</Content>
</EdiTrans>";
M_940 map = new M_940();
XmlMapReader r = new XmlMapReader(map);
EdiTrans t = r.ReadToEnd(xml);