-
Notifications
You must be signed in to change notification settings - Fork 753
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Text '' could not be parsed at index 0 #291
Comments
As a workaround in the java sdk you can find the OffsetDateTimeTypeAdapter in the generated JSON.java class and change the following function:
|
@Jookus , thanks! The C# code is generated differently. I tried messing with the JsonSerializerSettings but there is no property for the JSON serializer to ignore null values when deserializing. I will try to submit a PR to OpenAPIGenerator (I am using that generator) to add such an option (i.e. GenerateOptionalPropertiesAsNullable). |
@Jookus, The reason for this problem is that when the response data is returned, the time field is an empty string, and the source code only handles null and non-empty times. No processing is done on time data that returns null characters. If is a Java SDK, find the corresponding JSON class, find the corresponding OffsetDateTimeTypeAdapter the read method to do the processing of an empty string |
This is a very old issue that is probably not getting as much attention as it deserves. We encourage you to check if this is still an issue after the latest release and if you find that this is still a problem, please feel free to open a new issue and make a reference to this one. |
closed for inactivity |
Since a few days I am getting the following error when using the FBA Inventory API with the Java sdk without specifying a startDateTime. If I set any startDateTime, everything is fine, but I need to go throw the whole inventory database and as far as I understood the documentation startDateTime should be optional for that purpose.
Update:
While digging deeper I found out, that I recently created a new catalog item that has not been updated yet.
Here is the raw response from the api:
In this case 'lastUpdatedTime' is empty and causes the crash in ApiClient class when trying to deserialize to the GetInventorySummariesResponse class.
Other people have the same issue with different sdks: Link
I think the sdk should be able to handle these empty variables.
The text was updated successfully, but these errors were encountered: