New issue
Advanced search Search tips

Issue 916043 link

Starred by 2 users

Issue metadata

Status: Closed
Owner: ----
Closed: Jan 7
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

dev tools preview and response sequence mismatch

Reported by sugar.zh...@gmail.com, Dec 18

Issue description

UserAgent: 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:
 
preview data.png
187 KB View Download
response data.png
82.6 KB View Download
Labels: Needs-Triage-M71
Labels: Triage-ET Needs-Feedback
Thanks for filing the issue!

@Reporter: Could you please share a sample file/URL which helps us to triage the issue.
Cc: santhoshkumar@chromium.org
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
Project Member

Comment 5 by sheriffbot@chromium.org, Dec 24

Labels: -Needs-Feedback
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
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
Cc: viswa.karala@chromium.org
Labels: Needs-Feedback
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!
Components: -Blink Platform>DevTools

Comment 9 Deleted

Owner: ----
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