kevbite / CompaniesHouse.NET

A simple .NET client wrapper for CompaniesHouse API
MIT License
37 stars 44 forks source link

CompanyType 'uk-establishment' - 'Newtonsoft.Json.JsonSerializationException' #23

Closed Amith211 closed 8 years ago

Amith211 commented 8 years ago

It appears there is a relatively new CompanyType called 'uk-establishment'. You might find this post useful:

This results in the following in VS: An exception of type 'Newtonsoft.Json.JsonSerializationException' ...

Additional: Error converting value "uk-establishment" to type 'LiberisLabs.CompaniesHouse.Response.CompanyType'. Path 'items[2].company_type'

I used the CompanySearch with query text as 'British Gas'.

Cheers.

kevbite commented 8 years ago

Seems like the API docs online differ from the actual possible enum list here too - https://github.com/companieshouse/api-enumerations/blob/master/constants.yml

kevbite commented 8 years ago

Fixed in version 2.4.6 https://www.nuget.org/packages/CompaniesHouse/1.4.6