dev tools preview and response sequence mismatch
Reported by
sugar.zh...@gmail.com,
Dec 18
|
|||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36 Steps to reproduce the problem: 1. request an api and format the response data 2. we can see the first data in response is not same as the first data in preview What is the expected behavior? preview and response should have the some data order What went wrong? response data has the right order, but the preview is wrong Did this work before? N/A Chrome version: 71.0.3578.98 Channel: stable OS Version: OS X 10.13.6 Flash Version:
,
Dec 19
Thanks for filing the issue! @Reporter: Could you please share a sample file/URL which helps us to triage the issue.
,
Dec 19
,
Dec 24
This bug happened when I debug my api locally, the data is sorted in some ways, the reponse has the same order as my code returns, but the preview do not
,
Dec 24
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Dec 24
This is the json data, you can write a local api which assumes return the data in sample.json, then you can see the bug postingMap is the sorted list, but response and preview dont have the same order, response is right, but preview has wrong order
,
Dec 26
As per comment# 6 issue seems to be related to json file, which is out of scope for ET to create and triage the issue. @Reporter: Could you please provide sample Test File/URL to test and triage the issue and if possible provide screencast of the issue which help in better understanding and further triaging it. Thanks!
,
Dec 28
,
Jan 7
,
Jan 7
Thanks for filing the issue. As shown in the screenshot provided by the issue reporter, "postingMap"'s value is a JSON object. According to JSON specification (http://www.rfc-editor.org/rfc/rfc7159.txt): "An object is an unordered collection ...", one cannot assume the order of the fields inside a JSON object. Because when an object is stored the key-value pairs are stored in a hash map, there is no way to recover the original order when redisplayed in the preview panel. To preserve the order, one needs to use array instead of object. |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by phanindra.mandapaka@chromium.org
, Dec 18