Skip to content
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

Freakish whitespace in SP-API JSON responses #535

Open
johnkw opened this issue Mar 17, 2024 · 26 comments
Open

Freakish whitespace in SP-API JSON responses #535

johnkw opened this issue Mar 17, 2024 · 26 comments
Assignees
Labels
bug Something isn't working

Comments

@johnkw
Copy link

johnkw commented Mar 17, 2024

This has bothered me for years but I held back on filing a bug report. This affects most (or all?) API responses. But just for example here's the response from testing bug #370:

b'\n{\n\n\t\n\t\t\t\t\t\t"payload": {\n\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t"ShipmentData":\n\t\t\t\t[\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t}\n\n'

It's hilarious how it alternates back and forth between linefeeds and tabs, without ever outputting actual data.

This may not violate any JSON protocol, but it makes debug logs difficult to read for no reason.

@johnkw johnkw added the bug Something isn't working label Mar 17, 2024
@shreeharsh-a shreeharsh-a transferred this issue from amzn/selling-partner-api-docs May 9, 2024
Copy link

github-actions bot commented Jun 8, 2024

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.

@github-actions github-actions bot added the closing soon This issue will be closed soon label Jun 8, 2024
@johnkw
Copy link
Author

johnkw commented Jun 8, 2024

Can confirm this is still broken.

@github-actions github-actions bot removed the closing soon This issue will be closed soon label Jun 8, 2024
Copy link

github-actions bot commented Jul 8, 2024

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.

@github-actions github-actions bot added the closing soon This issue will be closed soon label Jul 8, 2024
@johnkw
Copy link
Author

johnkw commented Jul 8, 2024

This should not be closed. It could be converted to a "discussion" since that's apparently where bug reports go now.

@github-actions github-actions bot removed the closing soon This issue will be closed soon label Jul 8, 2024
Copy link

github-actions bot commented Aug 7, 2024

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.

@github-actions github-actions bot added the closing soon This issue will be closed soon label Aug 7, 2024
@johnkw
Copy link
Author

johnkw commented Aug 7, 2024

Still broken.

@github-actions github-actions bot removed the closing soon This issue will be closed soon label Aug 7, 2024
Copy link

github-actions bot commented Sep 6, 2024

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.

@github-actions github-actions bot added the closing soon This issue will be closed soon label Sep 6, 2024
@johnkw
Copy link
Author

johnkw commented Sep 6, 2024

Still broken.

@github-actions github-actions bot removed the closing soon This issue will be closed soon label Sep 6, 2024
Copy link

github-actions bot commented Oct 6, 2024

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.

@github-actions github-actions bot added the closing soon This issue will be closed soon label Oct 6, 2024
@johnkw
Copy link
Author

johnkw commented Oct 7, 2024

Still broken.

@github-actions github-actions bot removed the closing soon This issue will be closed soon label Oct 7, 2024
@weilinggu
Copy link
Contributor

weilinggu commented Oct 8, 2024

Can you provide a submission ID and endpoint you are calling of where you are getting these whitespaces in your response?

Weiling Gu
Selling Partner API Developer Services

@johnkw
Copy link
Author

johnkw commented Oct 8, 2024

I'm pretty sure every SP-API call has this problem. /fba/inbound/v0/shipments and /batches/products/pricing/v0/itemOffers certainly do. x-amzn-RequestId: c88ad3a6-1b52-405a-9a15-4abda06eb171.

@weilinggu
Copy link
Contributor

Hi @johnkw,

Thank you for bringing this issue to our attention. We submitted the feature request to remove whitespaces for review. Once we receive additional information we will post an update.

Thanks
Weiling,
Selling Partner API Developer Services

@weilinggu weilinggu self-assigned this Oct 9, 2024
@weilinggu
Copy link
Contributor

@johnkw Can you provide request ID for each endpoint you are getting white space issue?

Weiling
Selling Partner API Developer Services

@johnkw
Copy link
Author

johnkw commented Oct 10, 2024

/batches/products/pricing/v0/itemOffers x-amzn-RequestId: 71ad84ad-be1a-4a1f-aa42-910ef1e7de2e
/fba/inbound/v0/shipments x-amzn-RequestId: 506f2655-d9c1-466d-b1e6-cc62cb040e80

@weilinggu
Copy link
Contributor

@johnkw Can you provide timestamp and region as well?

@johnkw
Copy link
Author

johnkw commented Oct 10, 2024

How do I determine what the "region" is?

@johnkw
Copy link
Author

johnkw commented Oct 10, 2024

Date: Thu, 10 Oct 2024 18:51:37 GMT
x-amzn-RequestId: 506f2655-d9c1-466d-b1e6-cc62cb040e80

Date: Thu, 10 Oct 2024 18:51:02 GMT
x-amzn-RequestId: 71ad84ad-be1a-4a1f-aa42-910ef1e7de2e

@weilinggu
Copy link
Contributor

@johnkw Thanks for sharing. What is your marketplace?

@johnkw
Copy link
Author

johnkw commented Oct 11, 2024

'MarketplaceId': 'ATVPDKIKX0DER'

Copy link

This issue is scheduled to close soon. If you are still encountering problems, please feel free to open a new issue and make a reference to this one.

@github-actions github-actions bot added the closing soon This issue will be closed soon label Nov 10, 2024
@johnkw
Copy link
Author

johnkw commented Nov 10, 2024

This has not been fixed.

By the way, I never mentioned it, but ideally there should be no whitespace at all for efficiency's sake.

@github-actions github-actions bot removed the closing soon This issue will be closed soon label Nov 10, 2024
Copy link

This issue is scheduled to close soon. If you are still encountering problems, please feel free to open a new issue and make a reference to this one.

@github-actions github-actions bot added the closing soon This issue will be closed soon label Dec 10, 2024
@johnkw
Copy link
Author

johnkw commented Dec 10, 2024

While this issue is not terribly important, it would be good to leave it open until it's actually fixed.

@github-actions github-actions bot removed the closing soon This issue will be closed soon label Dec 10, 2024
Copy link

github-actions bot commented Jan 9, 2025

This issue is scheduled to close soon. If you are still encountering problems, please feel free to open a new issue and make a reference to this one.

@github-actions github-actions bot added the closing soon This issue will be closed soon label Jan 9, 2025
@johnkw
Copy link
Author

johnkw commented Jan 10, 2025

While this issue is not terribly important, it would be good to leave it open until it's actually fixed.

@github-actions github-actions bot removed the closing soon This issue will be closed soon label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants