Closed Bug 1434833 Opened 6 years ago Closed 6 years ago

If a json file contains the "class" keyword as a property, under certain circumstances JSONViewer crashes or does not display the file correctly

Categories

(DevTools :: JSON Viewer, defect)

57 Branch
All
Other
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1428587

People

(Reporter: budu.tudor, Unassigned)

References

()

Details

(Whiteboard: [specification][type:bug])

What did you do?
================
1. I have opened a json file which contained the response from a third party API that we are using

What happened?
==============
The content of the file appeared for a split second, and then a white page replaced it

What should have happened?
==========================
The content of the file should have been rendered as usual

Is there anything else we should know?
======================================
Having the "class" property in the json is not sufficient. The problem manifests starting from a certain depth. For example, when opening the following json, a "Minified React error #31" is thrown, and nothing is displayed:
{
 "level1": {
  "level2": {
   "level3": [
    {
     "level4": {
      "level5": {
       "level6": [
        {
         "class": {
         }
        }
       ]
      }
     }
    }
   ]
  }
 }
}
And for the following json, the object which contains "something" will not be displayed (level9 appears empty, even though it has an object):
{
 "level1": {
  "level2": {
   "level3": [
    {
     "level4": {
      "level5": {
       "level6": [
        {
         "level7": {
          "level8": {
           "level9": [
            {
             "class": {
               "something": "something"
             }
            }
           ]
          }
         }
        }
       ]
      }
     }
    }
   ]
  }
 }
}

The version of Firefox as of writing this is 57.0.4
Component: General → Developer Tools: JSON Viewer
Product: Mozilla Developer Network → Firefox
Version: unspecified → 57 Branch
I can reproduce this problem here with firefox-58.0.1-1.mga7 on Mageia v7 x86-64.
I can also reproduce this in the latest nightly in a new firefox profile.
You can easily see the issue by navigating to: 

data:application/json,{"level1":{"level2":{"level3":[{"level4":{"level5":{"level6":[{"level7":{"level8":{"level9":[{"class":{"something":"something"}}]}}}]}}}]}}}
See Also: → 1428587
Setting this bug as dupe since Bug 1428587 was filed before and had simpler steps to reproduce.
The issue will be fixed when Bug 1436670 lands.
Status: UNCONFIRMED → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.