Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #4 from scottksmith95/master

Added 2 checks within Company to to make sure name and industry field exist before accessing it
  • Loading branch information...
commit af24aeb607c59ecd48329fa50dda8c27d4a41192 2 parents 588eda0 + 30c4bb5
@bbaia bbaia authored
View
4 src/Spring.Social.LinkedIn/Social/LinkedIn/Api/Impl/Json/LinkedInFullProfileDeserializer.cs
@@ -282,8 +282,8 @@ private static Company DeserializeCompany(JsonValue json)
return new Company()
{
ID = json.ContainsName("id") ? json.GetValue<int>("id") : 0,
- Name = json.GetValue<string>("name"),
- Industry = json.GetValue<string>("industry"),
+ Name = json.ContainsName("name") ? json.GetValue<string>("name") : null,
+ Industry = json.ContainsName("industry") ? json.GetValue<string>("industry") : null,
Size = json.ContainsName("size") ? json.GetValue<string>("size") : null,
Type = json.ContainsName("type") ? json.GetValue<string>("type") : null,
Ticker = json.ContainsName("ticker") ? json.GetValue<string>("ticker") : null
Please sign in to comment.
Something went wrong with that request. Please try again.