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

JSON output isn't in the expected JSON format. #2

Closed
igauravsehrawat opened this issue Oct 19, 2017 · 4 comments
Closed

JSON output isn't in the expected JSON format. #2

igauravsehrawat opened this issue Oct 19, 2017 · 4 comments

Comments

@igauravsehrawat
Copy link

igauravsehrawat commented Oct 19, 2017

I see, you are using xml2json but the JSON output isn't most appealing and easy to use.

For eg:
I get the response like below
[ { '<ListInventorySupplyResponse xmlns="http://mws.amazonaws.com/FulfillmentInventory/2010-10-01/">': ' <ListInventorySupplyResult>' }, { '<ListInventorySupplyResponse xmlns="http://mws.amazonaws.com/FulfillmentInventory/2010-10-01/">': ' <MarketplaceId>MarketplaceId</MarketplaceId>' }, { '<ListInventorySupplyResponse xmlns="http://mws.amazonaws.com/FulfillmentInventory/2010-10-01/">': ' <InventorySupplyList>' }, { '<ListInventorySupplyResponse xmlns="http://mws.amazonaws.com/FulfillmentInventory/2010-10-01/">': ' <member>' }, { '<ListInventorySupplyResponse xmlns="http://mws.amazonaws.com/FulfillmentInventory/2010-10-01/">': ' <Condition>NewItem</Condition>' }, { '<ListInventorySupplyResponse xmlns="http://mws.amazonaws.com/FulfillmentInventory/2010-10-01/">': ' <SupplyDetail/>' }, { '<ListInventorySupplyResponse xmlns="http://mws.amazonaws.com/FulfillmentInventory/2010-10-01/">': ' <TotalSupplyQuantity>1447</TotalSupplyQuantity>' }, { '<ListInventorySupplyResponse xmlns="http://mws.amazonaws.com/FulfillmentInventory/2010-10-01/">': ' <EarliestAvailability>' }, { '<ListInventorySupplyResponse xmlns="http://mws.amazonaws.com/FulfillmentInventory/2010-10-01/">': ' <TimepointType>Immediately</TimepointType>' }, { '<ListInventorySupplyResponse xmlns="http://mws.amazonaws.com/FulfillmentInventory/2010-10-01/">': ' </EarliestAvailability>' }, { '<ListInventorySupplyResponse xmlns="http://mws.amazonaws.com/FulfillmentInventory/2010-10-01/">': ' <FNSKU>FNSKU</FNSKU>' }, { '<ListInventorySupplyResponse xmlns="http://mws.amazonaws.com/FulfillmentInventory/2010-10-01/">': ' <InStockSupplyQuantity>147</InStockSupplyQuantity>' }, { '<ListInventorySupplyResponse xmlns="http://mws.amazonaws.com/FulfillmentInventory/2010-10-01/">': ' <ASIN>ASIN</ASIN>' }, { '<ListInventorySupplyResponse xmlns="http://mws.amazonaws.com/FulfillmentInventory/2010-10-01/">': ' <SellerSKU>SellerSKU</SellerSKU>' }, { '<ListInventorySupplyResponse xmlns="http://mws.amazonaws.com/FulfillmentInventory/2010-10-01/">': ' </member>' }, { '<ListInventorySupplyResponse xmlns="http://mws.amazonaws.com/FulfillmentInventory/2010-10-01/">': ' </InventorySupplyList>' }, { '<ListInventorySupplyResponse xmlns="http://mws.amazonaws.com/FulfillmentInventory/2010-10-01/">': ' </ListInventorySupplyResult>' }, { '<ListInventorySupplyResponse xmlns="http://mws.amazonaws.com/FulfillmentInventory/2010-10-01/">': ' <ResponseMetadata>' }, { '<ListInventorySupplyResponse xmlns="http://mws.amazonaws.com/FulfillmentInventory/2010-10-01/">': ' <RequestId>5ome-24ndom-id</RequestId>' }, { '<ListInventorySupplyResponse xmlns="http://mws.amazonaws.com/FulfillmentInventory/2010-10-01/">': ' </ResponseMetadata>' }, { '<ListInventorySupplyResponse xmlns="http://mws.amazonaws.com/FulfillmentInventory/2010-10-01/">': '</ListInventorySupplyResponse>' } ]

While expected format is:

{"ListInventorySupplyResponse":{"xmlns":"http://mws.amazonaws.com/FulfillmentInventory/2010-10-01/","ListInventorySupplyResult":{"MarketplaceId":"MarketplaceId","InventorySupplyList":{"member":{"Condition":"NewItem","SupplyDetail":{},"TotalSupplyQuantity":"1447","EarliestAvailability":{"TimepointType":"Immediately"},"FNSKU":"FNSKU","InStockSupplyQuantity":"1447","ASIN":"ASIN","SellerSKU":"SellerSKU"}}},"ResponseMetadata":{"RequestId":"5ome-24ndom-id"}}}'
`

Is this fine and expected result?

Thanks

@bhushankummar
Copy link
Owner

@igauravsehrawat
I have made some changes to fix it.
Would you please take the latest version and verify it?

@igauravsehrawat
Copy link
Author

What a treat, thank you so much.
Works good for the functionalities provided.

On digging deep, I found out it doesn't have functionalities for FulfillmentOutboundShipment. Not sure if it is within the scope of the package.

Thanks Again.

@bhushankummar
Copy link
Owner

Yes, It is in our roadmap/ We'll be going to add that soon.

@igauravsehrawat
Copy link
Author

Awesome, great.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants