Created
March 7, 2011 18:17
-
-
Save kevinmcmahon/858913 to your computer and use it in GitHub Desktop.
POCO representation of GoogleSearchResults JSON
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Deserialise from JSON | |
[Serializable] | |
public class GoogleSearchResults | |
{ | |
public GoogleSearchResults() { } | |
public GoogleSearchResults(string _unescapedUrl, string _url, string _visibleUrl, string _cacheUrl, string _title, string _titleNoFormatting, string _content) | |
{ | |
this.unescapedUrl = _unescapedUrl; | |
this.url = _url; | |
this.visibleUrl = _visibleUrl; | |
this.cacheUrl = _cacheUrl; | |
this.title = _title; | |
this.titleNoFormatting = _titleNoFormatting; | |
this.content = _content; | |
} | |
string _unescapedUrl; | |
string _url; | |
string _visibleUrl; | |
string _cacheUrl; | |
string _title; | |
string _titleNoFormatting; | |
string _content; | |
[DataMember] | |
public string unescapedUrl | |
{ | |
get { return _unescapedUrl; } | |
set { _unescapedUrl = value; } | |
} | |
[DataMember] | |
public string url | |
{ | |
get { return _url; } | |
set { _url = value; } | |
} | |
[DataMember] | |
public string visibleUrl | |
{ | |
get { return _visibleUrl; } | |
set { _visibleUrl = value; } | |
} | |
[DataMember] | |
public string cacheUrl | |
{ | |
get { return _cacheUrl; } | |
set { _cacheUrl = value; } | |
} | |
[DataMember] | |
public string title | |
{ | |
get { return _title; } | |
set { _title = value; } | |
} | |
[DataMember] | |
public string titleNoFormatting | |
{ | |
get { return _titleNoFormatting; } | |
set { _titleNoFormatting = value; } | |
} | |
[DataMember] | |
public string content | |
{ | |
get { return _content; } | |
set { _content = value; } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Taken from this StackOverflow question : Parse JSON in C#