MicrosoftEdge / DevTools

Feedback and discussions about Microsoft Edge Developer Tools
MIT License
151 stars 49 forks source link

New JSON Viewer is changing the JSON serialized value for some numbers #246

Closed shawnwildermuth closed 2 months ago

shawnwildermuth commented 2 months ago

When using Edge for testing of an API, the JSON Viewer is changing the underlying JSON. See below:

image

I'd prefer to just turn off the view for now (since I am using extensions that do this, but they aren't enabled when the JSON Viewer is on).

captainbrosset commented 2 months ago

Thanks for filing this issue. I'm having some difficulties reproducing the problem though. Here is what I tried:

  1. Open a new tab in Microsoft Edge.
  2. Enter the following URL in the address bar: data:text/json,[{"id": 1636, "price": 43.00}].
  3. Press Enter.

Here is the result:

image

I'm not seeing the change to {value: "43.00n", "type": "Big Number"} like you do.

@shawnwildermuth would you be able to provide a URL or JSON file for us to reproduce the issue? Also, what's your Edge version?

In terms of disabling the JSON Viewer, you can do so by following these steps:

  1. Open a new tab and go to edge://flags
  2. In the search box at the top of the flags page, search for json viewer
  3. Change the flag to Disabled and then restart Edge.

image

shawnwildermuth commented 2 months ago

So, I am seeing the same thing you are (because the JSON Viewer isn't being enabled for this query:

image

But when I go to an URL (instead of a data block or even a local file), the JSON Viewer is used:

image

When I open the edge://flags, I don't see a JSON Viewer.

image

I seem to have the latest version (though I am not using a preview of Windows):

image

captainbrosset commented 2 months ago

On this screenshot:

image

the toolbar which you point to doesn't belong to the official Microsoft Edge JSON viewer. I don't know where it comes from, but it isn't our JSON viewer. Do you have an extension installed that handles JSON responses? I'm wondering if the Edge JSON viewer and a potential extension are competing to display JSON responses.

shawnwildermuth commented 2 months ago

I didn't think so. Let me look. That would explain a lot.

shawnwildermuth commented 2 months ago

So sorry for wasting your time. This was JSON Beatify extension that I thought I disabled. I mistakenly thought the icon here disabled, not just hid from the tool bar:

image

Totally a problem between the chair and the keyboard.

captainbrosset commented 2 months ago

Thanks for checking and reporting.