Get item from JSON Odata list for UWP - json

I have been having a hard time trying to figure this out that I've just about torn out all my hair now.
Using this section of code (Added a var result that I looking at with a stoppoint):
public async Task<string> GetHttpSPContentWithToken(string url, string token)
{
var httpClient = new System.Net.Http.HttpClient();
System.Net.Http.HttpResponseMessage response;
try
{
var request = new System.Net.Http.HttpRequestMessage(System.Net.Http.HttpMethod.Get, url);
//Add the token in Authorization header
request.Headers.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", token);
response = await httpClient.SendAsync(request);
var content = await response.Content.ReadAsStringAsync();
var result = JsonConvert.DeserializeObject<SharePointListItems.Fields>(content);
return content;
}
catch (Exception ex)
{
return ex.ToString();
}
}
The content that I receive is this (updated getting rid of extra information):
{
"#odata.context": "https://graph.microsoft.com/v1.0/$metadata#sites('root')/lists('FBA0AB63-8453-4BB9-AA17-142A5D72A50D')/items/$entity",
"#odata.etag": "\"60d40002-0f08-4f29-afa7-0287137b863b,1\"",
"createdDateTime": "2018-08-07T14:28:47Z",
"eTag": "\"60d40002-0f08-4f29-afa7-0287137b863b,1\"",
"id": "1",
"lastModifiedDateTime": "2018-08-07T14:28:47Z",
"webUrl": "https://XXXX.sharepoint.com/Lists/TestList/1_.000",
"createdBy": {
"user": {
"email": "XXXX#XXXX.onmicrosoft.com",
"id": "b5f81cc6-f8b7-46b7-8e10-6ce1b9689c23",
"displayName": "TK"
}
},
"lastModifiedBy": {
"user": {
"email": "XXXX#XXXX.onmicrosoft.com",
"id": "b5f81cc6-f8b7-46b7-8e10-6ce1b9689c23",
"displayName": "TK"
}
},
"parentReference": {},
"contentType": {
"id": "0x010001403BD420356E4ABE3B63E5AEC0713D"
},
"fields#odata.context": "https://graph.microsoft.com/v1.0/$metadata#sites('root')/lists('FBA0AB63-8453-4BB9-AA17-142A5D72A50D')/items('1')/fields/$entity",
"fields": {
"#odata.etag": "\"60d40002-0f08-4f29-afa7-0287137b863b,1\"",
"Title": "1",
"UserName": "TK",
"UserAge": "47",
"UserTitle": "Developer"
}
}
I just want the values forUserAge, UserName, and UserTitle to put each into a textbox, but not sure how to pull them out.
I am pretty sure that I need to set up a class of some sort, but it is the #odata parts that are breaking my back.
Everything that I have tried just gives me back a null value. I see the value there, just not sure how to parse/pull it out.
I have looked at this (updated):
using Newtonsoft.Json;
using System;
public class SharePointListItems
{
public class UserCreated
{
public string email { get; set; }
public string id { get; set; }
public string displayName { get; set; }
}
public class CreatedBy
{
public UserCreated user { get; set; }
}
public class UserModified
{
public string email { get; set; }
public string id { get; set; }
public string displayName { get; set; }
}
public class LastModifiedBy
{
public UserModified user { get; set; }
}
public class ParentReference
{
}
public class ContentType
{
public string id { get; set; }
}
public class Fields
{
[JsonProperty("#odata.etag")]
public string ODataETag { get; set; }
public string Title { get; set; }
public string UserName { get; set; }
public string UserAge { get; set; }
public string UserTitle { get; set; }
}
public class RootObject
{
[JsonProperty("#odata.context")]
public string ODataContext { get; set; }
[JsonProperty("#odata.etag")]
public string ODataETag { get; set; }
public DateTime createdDateTime { get; set; }
public string eTag { get; set; }
public string id { get; set; }
public DateTime lastModifiedDateTime { get; set; }
public string webUrl { get; set; }
public CreatedBy createdBy { get; set; }
public LastModifiedBy lastModifiedBy { get; set; }
public ParentReference parentReference { get; set; }
public ContentType contentType { get; set; }
[JsonProperty("fields#odata.context")]
public string FieldsODataContext { get; set; }
public Fields fields { get; set; }
}
}
But then I run into the issue that there is two [JsonProperty("#odata.etag")].

The [JsonProperty] custom attribute is added to the C# property that actually holds that value. Instead of putting the attribute on the Title or createDateTime property, you need to put them on their own properties:
public class RootObject
{
[JsonProperty("#odata.context")]
public string ODataContext { get; set; }
[JsonProperty("#odata.etag")]
public string ODataETag { get; set; }
// No attribute needed here
public DateTime createdDateTime { get; set; }
// etc...
Also, you are trying to parse the content as a Fields class, but it is a RootObject; you need to use
JsonConvert.DeserializeObject<SharePointListItems.RootObject>(content)
To get the object.

Related

Setting an ObservableCollection = to a json response

I am currently writing a Xamarin forms application. The issue I am facing is that I am receiving a Json Response from my API, and storing it in a var JsonReponse. The code is as follows;
string UserId = Settings.CallUserId;
var client = new RestClient("http://blablablaAPiCall" + UserId);
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Content-Type", "application/json");
var body = #"";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
var JsonResponse = JsonConvert.DeserializeObject<Flights[]>(response.Content);
FlightsCollection = new ObservableCollection<Flights>
{
new Flights() {Id="1", SectorStart="1", Registration="A123",
Departure="Jhb", OffBlockTime="1242", Arrival="EC", OnBlockTime="1342",
TotalFlightTime="0100", InstrumentTime="00" }
};
The class I made looks like this;
public class Flights
{
public string Id { get; set; }
public string UserId { get; set; }
public string EntryDate { get; set; }
public string IsMasterId { get; set; }
public string SectorStart { get; set; }
public string SectorEnd { get; set; }
public string AircraftType { get; set; }
public string Registration { get; set; }
public string PicName { get; set; }
public string PilotFunction { get; set; }
public string Departure { get; set; }
public string Arrival { get; set; }
public string OffBlockTime { get; set; }
public string OnBlockTime { get; set; }
public string TotalFlightTime { get; set; }
public string NightLanding { get; set; }
public string Instructor { get; set; }
public string Simulator { get; set; }
public string NightTime { get; set; }
public string DayTime { get; set; }
public string InstrumentTime { get; set; }
public string ApproachType { get; set; }
public string NavAid { get; set; }
public string Place { get; set; }
public string FinalRemarks { get; set; }
}
At the top I declared an Obvservable Collection,
public ObservableCollection<Flights> FlightsCollection { get; set; }
So now the end goal would be for me to set my json response = Observable collection, as you can see I have done it statically, but now how do I do it with my json response?
My json response looks like this if needed,
[
{
"ID": 15,
"UserID": 10,
"EntryDate": "2022/01/02 2:34:20 PM",
"IsMasterID": true,
"SectorStart": 1,
"SectorEnd": 1,
"Aircraft_Type": "Unclassified",
"Registration": "aircraft reg",
"PICName": "Jordan Watts",
"PilotFunction": "PIC",
"Departure": "Jhb",
"Arrival": "EC",
"OffBlockTime": "00:00",
"OnBlockTime": "01:15",
"TotalFlightTime": "01:15",
"NightLanding": true,
"Instructor": true,
"Simulator": true,
"NightTime": "01:15",
"DayTime": "00:00",
"InstrumentTime": "0000",
"ApproachType": "VOR",
"NavAid": "nav",
"Place": "here",
"FinalRemarks": "this flight was cool"
},
{
"ID": 16,
"UserID": 10,
"EntryDate": "2022/01/02 2:44:10 PM",
"IsMasterID": true,
"SectorStart": 1,
"SectorEnd": 3,
"Aircraft_Type": "Unclassified",
"Registration": "aircraft reg",
"PICName": "Jordan Watts ",
"PilotFunction": "PICUS",
"Departure": "JHb",
"Arrival": "EC",
"OffBlockTime": "00:00",
"OnBlockTime": "01:00",
"TotalFlightTime": "01:00",
"NightLanding": true,
"Instructor": true,
"Simulator": true,
"NightTime": "01:00",
"DayTime": "00:00",
"InstrumentTime": "0000",
"ApproachType": "VOR",
"NavAid": "nav aid",
"Place": "here",
"FinalRemarks": "rhrbdidbf"
},
{
"ID": 18,
"UserID": 10,
"EntryDate": "2022/01/02 2:53:56 PM",
"IsMasterID": true,
"SectorStart": 1,
"SectorEnd": 2,
"Aircraft_Type": "Unclassified",
"Registration": "reg",
"PICName": "Jordan Watts ",
"PilotFunction": "PICUS",
"Departure": "Jhb",
"Arrival": "EC",
"OffBlockTime": "00:00",
"OnBlockTime": "02:15",
"TotalFlightTime": "02:15",
"NightLanding": true,
"Instructor": true,
"Simulator": true,
"NightTime": "02:15",
"DayTime": "00:0",
"InstrumentTime": "0000",
"ApproachType": "VOR",
"NavAid": "here",
"Place": "here 2",
"FinalRemarks": "flight 1 of 2 "
}
]
ObservableCollection accepts an IEnumerable which DeserializeObject can generate. Try this:
FlightsCollection = new ObservableCollection<Flights>(JsonConvert.DeserializeObject<List<Flights>>(response.Content))
if you want to have only some properties , you can create subclass accoring to your needs
FlightBase[] flights = JsonConvert.DeserializeObject<FlightBase[]>(response.Content);
ObservableCollection<FlightBase> FlightsCollection = new ObservableCollection<FlightBase>(flights);
classes
public class FlightBase
{
public int ID { get; set; }
public int SectorStart { get; set; }
public string Registration { get; set; }
public string Departure { get; set; }
public string Arrival { get; set; }
public string OffBlockTime { get; set; }
public string OnBlockTime { get; set; }
public string TotalFlightTime { get; set; }
public string InstrumentTime { get; set; }
}
public class Flight:FlightBase
{
public int UserID { get; set; }
public string EntryDate { get; set; }
public bool IsMasterID { get; set; }
public int SectorEnd { get; set; }
public string Aircraft_Type { get; set; }
public string PICName { get; set; }
public string PilotFunction { get; set; }
public bool NightLanding { get; set; }
public bool Instructor { get; set; }
public bool Simulator { get; set; }
public string NightTime { get; set; }
public string DayTime { get; set; }
public string ApproachType { get; set; }
public string NavAid { get; set; }
public string Place { get; set; }
public string FinalRemarks { get; set; }
}

Raw JSON for Key:Value

I have been looking for ages and found some similar questions but no answers which fixed my issue.
I have recently developed a Web API project with seperate server side and client side code. I am wanting to do some testing through apiary, mainly for posting data. This requires me to have a "sample" of the posted JSON. However i cannot seem to get a working sample (I am using Postman to test the JSON).
I am sending a ViewModel:
public class ExampleViewModel
{
public ExampleModel exampleModel { get; set; }
public String[] strings { get; set; }
}
With the model:
public class ExampleModel
{
public long ID { get; set; }
public string User { get; set; }
public string Title { get; set; }
public string Type { get; set; }
public string Description { get; set; }
public bool Recieved { get; set; }
public bool CompleteRemotly { get; set; }
public bool CompleteInField { get; set; }
public string Email { get; set; }
public Nullable<DateTime> RecievedDate { get; set; }
public Nullable<DateTime> ScheduledFor { get; set; }
public Nullable<DateTime> CompleteOn { get; set; }
public string Priority { get; set; }
public string DiagnosticReports { get; set; }
public string CReference { get; set; }
public string JReference { get; set; }
}
The format the POST is expecting is:
Key: "evm",
Value: {APIProject.ViewModels.ExampleViewModel}
And:
APIProject.ViewModels.ExampleViewModel:
{
strings = [""],
exampleModel = {ExampleModel}
}
My latest attempt is:
{
"evm":{
"ExampleViewModel":{
"exampleModel":{
"ID":0,
"User":"Harrison",
"Title":"Other",
"Type":"Other",
"Description":"ygfvgufuf",
"Recieved":true,
"CompleteRemotly":false,
"CompleteInField":false,
"Email":null,
"RecievedDate":"\/Date(1458133155546)\/",
"ScheduledFor":null,
"CompleteOn":null,
"Priority":"Low",
"DiagnosticReports":null,
"CPA_Reference":null,
"Jira_Reference":null,
"strings":[]
},
"strings":[""]
}
}
}
Which returns:
Key: "evm",
Value: {APIProject.ViewModels.ExampleViewModel}
And:
APIProject.ViewModels.ExampleViewModel:
{
strings = null,
exampleModel = null
}
So i got this to work by sending the following JSON, I guess i was over complicating the situation.
{
"requestManagements":{
"RequestID":0,
"User":"Harrison",
"RequestTitle":"Other",
"RequestType":"Other",
"RequestDescription":"ygfvgufuf",
"RequestRecieved":true,
"RequestCompleteRemotly":false,
"RequestCompleteInField":false,
"Email":null,
"RequestRecievedDate":"\/Date(1458133155546)\/",
"ScheduledFor":null,
"CompleteOn":null,
"Priority":"Low",
"DiagnosticReports":null,
"CPA_Reference":null,
"Jira_Reference":null,
"RequestManagerImages":[]
},
"images":[""]
}

WCF Rest Service Request Object' s Fields Always Null

I created a WCF Rest Service. I try to Post method usage. I send request from client, request getting from service method. But request object (CompanyDTO) fields values are null. Where is problem? I could' nt find.
Service post method
public void SaveCompany(CompanyDTO NewCompany)
{
try
{
CompanyManager manager = new CompanyManager();
manager.Save(NewCompany);
WebOperationContext ctx = WebOperationContext.Current;
ctx.OutgoingResponse.StatusCode = System.Net.HttpStatusCode.OK;
}
catch (Exception ex)
{
throw new FaultException(new FaultReason(ex.Message));
}
}
Contract service interface
[OperationContract]
[WebInvoke(Method = "POST", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json,
BodyStyle = WebMessageBodyStyle.Bare,
UriTemplate = "SaveCompany")]
void SaveCompany(CompanyDTO NewCompany);
CompantDTO class
public class CompanyDTO
{
public string IDENTIFIER { get; set; }
public string TYPE { get; set; }
public string USER_TYPE { get; set; }
public string FIRST_NAME { get; set; }
public string MIDDLE_NAME { get; set; }
public string FAMILY_NAME { get; set; }
public string COMPANY_NAME { get; set; }
public Nullable<int> COMPANY_NO { get; set; }
public string LEGAL_OFFICE { get; set; }
public Nullable<System.DateTime> FOUNDATION_DATE { get; set; }
public string BOARDOFTRADE_NAME { get; set; }
public string BOARDOFTRADE_ID { get; set; }
public string MERSIS_NO { get; set; }
public string TAPDK_NO { get; set; }
public string TRADE_REGISTRATION_NO { get; set; }
public string TRADE_REGISTRATION_OFFICE { get; set; }
public string TAX_IDENTIFICATION_NO { get; set; }
public Nullable<System.DateTime> DIGITAL_SIGN_VALIDITY_DATE { get; set; }
public string TAX_OFFICE { get; set; }
public string TAX_OFFICE_CODE { get; set; }
public Nullable<short> STATUS { get; set; }
public Nullable<int> SYS_VERSION { get; set; }
public Nullable<System.DateTime> SYS_LAST_UPDATE { get; set; }
}
Client request body
{
"CompanyDTO":
{
"IDENTIFIER":"34501599398",
"TYPE":"1",
"USER_TYPE":"1",
"FIRST_NAME":"Ebru",
"MIDDLE_NAME":"sws",
"FAMILY_NAME":"sd",
"COMPANY_NAME":"NULL",
"COMPANY_NO": "123",
"LEGAL_OFFICE": "DSF",
"FOUNDATION_DATE":"2015-03-02",
"BOARDOFTRADE_NAME":"SAD",
"BOARDOFTRADE_ID":"ASD",
"MERSIS_NO":"DASD",
"TAPDK_NO":"NULASDASDL",
"TRADE_REGISTRATION_NO":"NULL",
"TRADE_REGISTRATION_OFFICE":"ADS",
"TAX_IDENTIFICATION_NO":"NUASDSALL",
"DIGITAL_SIGN_VALIDITY_DATE": "2015-03-02",
"TAX_OFFICE":"ASDAD",
"TAX_OFFICE_CODE":"ASDA",
"STATUS": "1",
"SYS_VERSION" : "1",
"SYS_LAST_UPDATE": "2015-03-02"
}
}
It seems you need to get rid of "CompanyDTO" in your json, so it looks likes this:
{
"IDENTIFIER":"34501599398",
"TYPE":"1",
"USER_TYPE":"1",
"FIRST_NAME":"Ebru",
"MIDDLE_NAME":"sws",
"FAMILY_NAME":"sd",
"COMPANY_NAME":"NULL",
"COMPANY_NO": "123",
"LEGAL_OFFICE": "DSF",
"FOUNDATION_DATE":"2015-03-02",
"BOARDOFTRADE_NAME":"SAD",
"BOARDOFTRADE_ID":"ASD",
"MERSIS_NO":"DASD",
"TAPDK_NO":"NULASDASDL",
"TRADE_REGISTRATION_NO":"NULL",
"TRADE_REGISTRATION_OFFICE":"ADS",
"TAX_IDENTIFICATION_NO":"NUASDSALL",
"DIGITAL_SIGN_VALIDITY_DATE": "2015-03-02",
"TAX_OFFICE":"ASDAD",
"TAX_OFFICE_CODE":"ASDA",
"STATUS": "1",
"SYS_VERSION" : "1",
"SYS_LAST_UPDATE": "2015-03-02"
}

Parse Json to List

I want to parse a json to List how can we do that. I have tried the following code but it didnt worked
Dictionary<string, object> pGateways=(Dictionary<string,object>)Json.JsonParser.FromJson(jsonString);
List<object> creditOptions = new List<object>();
creditOptions = (List<object>)pGateways;
And after getting it int list i want to loop through it
Here is my sample json
{
"MessageCode": "CS2009",
"Status": "Y",
"ErrorCode": "0",
"ErrorDescription": "Success",
"account":
{
"card":
[
{
"cardend": "asd",
"token": "aads",
"cardstart": "asdad",
"accounttype": "asda",
"cardnetwork": "as",
"issuer": "asd",
"customername": "a",
"expdate": "04/2018"
},
{
"cardend": "asda",
"token":"adssadsa",
"cardstart": "asd",
"accounttype": "asd",
"cardnetwork": "asd",
"issuer": "asda",
"customername": "asd",
"expdate": "03/2016"
}
],
"bank": []
}
}
The best option could be to use the JsonConvert in order to parse Json into a List.
Reference: JSON Parsing in Windows Phone
You can use Json.Net.
To install Json.NET use NugetGallery : Json.net Nugets Gallery
And you can use json2Csharp.com for generate c# classes from json
The JSON string you posted is not suitable for straight-forward deserialization to List. The easiest thing to do is use the online JSON 2 CSharp tool to generate classes and deserialize the json string to it. Here is an example of the generated classes:
public class Card
{
public string cardend { get; set; }
public string token { get; set; }
public string cardstart { get; set; }
public string accounttype { get; set; }
public string cardnetwork { get; set; }
public string issuer { get; set; }
public string customername { get; set; }
public string expdate { get; set; }
}
public class Account
{
public List<Card> card { get; set; }
public List<object> bank { get; set; }
}
public class RootObject
{
public string MessageCode { get; set; }
public string Status { get; set; }
public string ErrorCode { get; set; }
public string ErrorDescription { get; set; }
public Account account { get; set; }
}
And here is the logic for deserialization:
var root = JsonConvert.DeserializeObject<RootObject>(jsonStr);
where the jsonStr variable holds the json string you posted.
You need to use json2csharp tool to generate classes and deserialize the JSON string to list.
Here is the Classes generated from your JSON string.
public class Card
{
public string cardend { get; set; }
public string token { get; set; }
public string cardstart { get; set; }
public string accounttype { get; set; }
public string cardnetwork { get; set; }
public string issuer { get; set; }
public string customername { get; set; }
public string expdate { get; set; }
}
public class Account
{
public List<Card> card { get; set; }
public List<object> bank { get; set; }
}
public class RootObject
{
public string MessageCode { get; set; }
public string Status { get; set; }
public string ErrorCode { get; set; }
public string ErrorDescription { get; set; }
public Account account { get; set; }
}
and Deserialize your JSON object using JsonConvert,
Suppose e.result is your JSON string then
var rootObject = JsonConvert.DeserializeObject<RootObject>(e.Result);
foreach (var blog in rootObject.Card)
{
//access your data like this- `blog.cardend;` or `blog.token;`
}

Having trouble finding the right JSON request

I will appologise in advance if I am being really stupid here, but I cant find the right syntax to extract some data from a JSON return. The following is the returned JSON data:
{
"version":"1.0",
"encoding":"UTF-8",
"feed":{
"xmlns":"http://www.w3.org/2005/Atom",
"xmlns$openSearch":"http://a9.com/-/spec/opensearchrss/1.0/",
"xmlns$gsx":"http://schemas.google.com/spreadsheets/2006/extended",
"id":{
"$t":"https://spreadsheets.google.com/feeds/list/0AhySzEddwIC1dEN6bnNQYkRlVE50RlBRLUQ5YlZhNUE/1/public/basic"
},
"updated":{
"$t":"2012-12-03T10:33:13.778Z"
},
"category":[
{
"scheme":"http://schemas.google.com/spreadsheets/2006",
"term":"http://schemas.google.com/spreadsheets/2006#list"
}
],
"title":{
"type":"text",
"$t":"Sheet1"
},
"link":[
{
"rel":"alternate",
"type":"text/html",
"href":"https://spreadsheets.google.com/pub?key\u003d0AhySzEddwIC1dEN6bnNQYkRlVE50RlBRLUQ5YlZhNUE"
},
{
"rel":"http://schemas.google.com/g/2005#feed",
"type":"application/atom+xml",
"href":"https://spreadsheets.google.com/feeds/list/0AhySzEddwIC1dEN6bnNQYkRlVE50RlBRLUQ5YlZhNUE/1/public/basic"
},
{
"rel":"self",
"type":"application/atom+xml",
"href":"https://spreadsheets.google.com/feeds/list/0AhySzEddwIC1dEN6bnNQYkRlVE50RlBRLUQ5YlZhNUE/1/public/basic?alt\u003djson"
}
],
"author":[
{
"name":{
"$t":"rourkie"
},
"email":{
"$t":"rourkie#gmail.com"
}
}
],
"openSearch$totalResults":{
"$t":"1"
},
"openSearch$startIndex":{
"$t":"1"
},
"entry":[
{
"id":{
"$t":"https://spreadsheets.google.com/feeds/list/0AhySzEddwIC1dEN6bnNQYkRlVE50RlBRLUQ5YlZhNUE/1/public/basic/cn6ca"
},
"updated":{
"$t":"2012-12-03T10:33:13.778Z"
},
"category":[
{
"scheme":"http://schemas.google.com/spreadsheets/2006",
"term":"http://schemas.google.com/spreadsheets/2006#list"
}
],
"title":{
"type":"text",
"$t":"5872.64"
},
"content":{
"type":"text",
"$t":"change: 3.6"
},
"link":[
{
"rel":"self",
"type":"application/atom+xml",
"href":"https://spreadsheets.google.com/feeds/list/0AhySzEddwIC1dEN6bnNQYkRlVE50RlBRLUQ5YlZhNUE/1/public/basic/cn6ca"
}
]
}
]
}
}
I am trying to extract the "change" figure, with the following:
feed.entry[4].content.$t
but it just keeps returning an error.
Can anyone shed some light on what I am doing wrong??
Thanks
JSONLint - http://jsonlint.com/ - is pretty handy for this.
The JSON you posted only has one object in the entry array (unless you just posted it as an example)...so it would be:
feed.entry[0].content.$t
Using json2csharp.com (http://json2csharp.com/) You can paste in json and it will give you a class matching the json allowing you to easily parse it. Check How can I parse JSON with C#? on how to use JsonConvert. I believe you can find it in nuget packages. Keep in mind the class I have pasted below will not work directly, because of the naming of some of the fields in the json. You may have to rename them manually and map them.
public class Id
{
public string __invalid_name__$t { get; set; }
}
public class Updated
{
public string __invalid_name__$t { get; set; }
}
public class Category
{
public string scheme { get; set; }
public string term { get; set; }
}
public class Title
{
public string type { get; set; }
public string __invalid_name__$t { get; set; }
}
public class Link
{
public string rel { get; set; }
public string type { get; set; }
public string href { get; set; }
}
public class Name
{
public string __invalid_name__$t { get; set; }
}
public class Email
{
public string __invalid_name__$t { get; set; }
}
public class Author
{
public Name name { get; set; }
public Email email { get; set; }
}
public class OpenSearchTotalResults
{
public string __invalid_name__$t { get; set; }
}
public class OpenSearchStartIndex
{
public string __invalid_name__$t { get; set; }
}
public class Id2
{
public string __invalid_name__$t { get; set; }
}
public class Updated2
{
public string __invalid_name__$t { get; set; }
}
public class Category2
{
public string scheme { get; set; }
public string term { get; set; }
}
public class Title2
{
public string type { get; set; }
public string __invalid_name__$t { get; set; }
}
public class Content
{
public string type { get; set; }
public string __invalid_name__$t { get; set; }
}
public class Link2
{
public string rel { get; set; }
public string type { get; set; }
public string href { get; set; }
}
public class Entry
{
public Id2 id { get; set; }
public Updated2 updated { get; set; }
public List<Category2> category { get; set; }
public Title2 title { get; set; }
public Content content { get; set; }
public List<Link2> link { get; set; }
}
public class Feed
{
public string xmlns { get; set; }
public string __invalid_name__xmlns$openSearch { get; set; }
public string __invalid_name__xmlns$gsx { get; set; }
public Id id { get; set; }
public Updated updated { get; set; }
public List<Category> category { get; set; }
public Title title { get; set; }
public List<Link> link { get; set; }
public List<Author> author { get; set; }
public OpenSearchTotalResults __invalid_name__openSearch$totalResults { get; set; }
public OpenSearchStartIndex __invalid_name__openSearch$startIndex { get; set; }
public List<Entry> entry { get; set; }
}
public class RootObject
{
public string version { get; set; }
public string encoding { get; set; }
public Feed feed { get; set; }
}