Need help setting up JSON service and Datatable
Need help setting up JSON service and Datatable
I'm extremely new to any sort of coding and could use a hand.
Given a service http://localhost/test.svc
that returns JSON:
[code][
{
CreateDateTime: null,
CreateUser: null,
CreateUserGuid: "242d1125-0884-42cb-8be5-026d5027228d",
Message: "Littering and?",
MessageSeverity: {
Agency: null,
AgencyGuid: null,
ChildCodes: [ ],
CodeGuid: "cf5af44d-927d-4e46-86e4-9e77e5781f8d",
CodeParameters: [ ],
CodeSource: null,
CodeSourceGuid: null,
CodeType: null,
CodeTypeGuid: "bff30a5b-0fa3-4008-8917-ed8d8b75fa77",
CodeValue: "LOW",
Comment: "",
CreateDateTime: "/Date(1323963853900-0600)/",
CreateUser: null,
CreateUserGuid: null,
DefaultValue: false,
Description: "Low",
ModifyDateTime: null,
ModifyUser: null,
ModifyUserGuid: null,
ParentCode: null,
ParentCodeGuid: null,
PrintValue: "Low",
RecordStatus: null,
RecordStatusKey: 0
},
MessageSeverityCodeGuid: "cf5af44d-927d-4e46-86e4-9e77e5781f8d",
MessageSubject: {
Agency: null,
AgencyGuid: null,
ChildCodes: [ ],
CodeGuid: "8152b7d5-b050-49e8-bc6e-36b2a20b44e3",
CodeParameters: [ ],
CodeSource: null,
CodeSourceGuid: "090f8a75-eb76-423e-ba83-a1ac884f047d",
CodeType: null,
CodeTypeGuid: "92b6c548-a9dd-4dd2-89b8-ee99f511b099",
CodeValue: "D",
Comment: "",
CreateDateTime: null,
CreateUser: null,
CreateUserGuid: null,
DefaultValue: false,
Description: "Victim Refused to Cooperate",
ModifyDateTime: "/Date(1300800198363-0500)/",
ModifyUser: null,
ModifyUserGuid: null,
ParentCode: null,
ParentCodeGuid: null,
PrintValue: "D",
RecordStatus: null,
RecordStatusKey: 2
}
]
[/code]
How would I set this up? I don't expect someone to do all the work for me but any sort of shove in the right direction would be appreciation. I have actually tried this but have hit a brick wall with my table not having any data.
Thanks.
Given a service http://localhost/test.svc
that returns JSON:
[code][
{
CreateDateTime: null,
CreateUser: null,
CreateUserGuid: "242d1125-0884-42cb-8be5-026d5027228d",
Message: "Littering and?",
MessageSeverity: {
Agency: null,
AgencyGuid: null,
ChildCodes: [ ],
CodeGuid: "cf5af44d-927d-4e46-86e4-9e77e5781f8d",
CodeParameters: [ ],
CodeSource: null,
CodeSourceGuid: null,
CodeType: null,
CodeTypeGuid: "bff30a5b-0fa3-4008-8917-ed8d8b75fa77",
CodeValue: "LOW",
Comment: "",
CreateDateTime: "/Date(1323963853900-0600)/",
CreateUser: null,
CreateUserGuid: null,
DefaultValue: false,
Description: "Low",
ModifyDateTime: null,
ModifyUser: null,
ModifyUserGuid: null,
ParentCode: null,
ParentCodeGuid: null,
PrintValue: "Low",
RecordStatus: null,
RecordStatusKey: 0
},
MessageSeverityCodeGuid: "cf5af44d-927d-4e46-86e4-9e77e5781f8d",
MessageSubject: {
Agency: null,
AgencyGuid: null,
ChildCodes: [ ],
CodeGuid: "8152b7d5-b050-49e8-bc6e-36b2a20b44e3",
CodeParameters: [ ],
CodeSource: null,
CodeSourceGuid: "090f8a75-eb76-423e-ba83-a1ac884f047d",
CodeType: null,
CodeTypeGuid: "92b6c548-a9dd-4dd2-89b8-ee99f511b099",
CodeValue: "D",
Comment: "",
CreateDateTime: null,
CreateUser: null,
CreateUserGuid: null,
DefaultValue: false,
Description: "Victim Refused to Cooperate",
ModifyDateTime: "/Date(1300800198363-0500)/",
ModifyUser: null,
ModifyUserGuid: null,
ParentCode: null,
ParentCodeGuid: null,
PrintValue: "D",
RecordStatus: null,
RecordStatusKey: 2
}
]
[/code]
How would I set this up? I don't expect someone to do all the work for me but any sort of shove in the right direction would be appreciation. I have actually tried this but have hit a brick wall with my table not having any data.
Thanks.
This discussion has been closed.
Replies
Allan