If you are using the Oodle .NET API library – OodleRestApi then you may have encountered an exception that looks like this:
First Exception: Error converting value "j" to type 'Love2Trade.OodleRestApi.Json.OodleResult+ImageData+ImageSizeData'.
Newtonsoft.Json.JsonSerializationException: Error converting value "j" to type 'Love2Trade.OodleRestApi.Json.OodleResult+ImageData+ImageSizeData'. ---> System.Exception: Could not cast or convert from System.String to Love2Trade.OodleRestApi.Json.OodleResult+ImageData+ImageSizeData.
at Newtonsoft.Json.Utilities.ConvertUtils.EnsureTypeAssignable(Object value, Type initialType, Type targetType) in d:\Development\Releases\Json\Working\Src\Newtonsoft.Json\Utilities\ConvertUtils.cs:line 460
at Newtonsoft.Json.Utilities.ConvertUtils.ConvertOrCast(Object initialValue, CultureInfo culture, Type targetType) in d:\Development\Releases\Json\Working\Src\Newtonsoft.Json\Utilities\ConvertUtils.cs:line 385
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureType(Object value, Type targetType) in d:\Development\Releases\Json\Working\Src\Newtonsoft.Json\Serialization\JsonSerializerInternalReader.cs:line 464
I have updated the library and it’s now fixed. You can download it here
Filed under: Technical Tagged: | oodle .net api rpc restapi