# Invalid JSON errors

**URL:** <https://phaser.discourse.group/t/invalid-json-errors/10655>\
**Category:** Phaser 3\
**Created:** [November 14, 2021, 5:05am UTC](https://phaser.discourse.group/t/invalid-json-errors/10655 "2021-11-14T05:05:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![stanleyseow](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/stanleyseow/32/1190_2.png) [@stanleyseow](https://phaser.discourse.group/u/stanleyseow)\
**Post date:** [November 14, 2021, 5:05am UTC](https://phaser.discourse.group/t/invalid-json-errors/10655/1 "2021-11-14T05:05:24Z")

</div>

I m using the below plugins ( GzDialog.js) ) that needed to load a JSON of dialogs.

```javascript
 preload() {
    this.load.json("scriptdata", "./assets/script.json");
  }

```

I got this error

```javascript
phaser.js:16099 Invalid JSON: scriptdata

```

I m just using the same JSON file as the author below… when i run his repo on phaser: “3.22.0”, there were no errors … I m on 3.55.2 at the moment …

```javascript
{
    "_description": "The script object contains a list of dialog responses for game characters. Top level properties reference the character doing the speaking. Child properties are the key name of the object spoken in response to.",
    "zeta": {
        "objectA": "Can't leave yet. I have a mission to complete.",
        "objectB": "Ow!",
        "labsign": "Hmm. This may be the entrance to the secret lab.",
        "sportmodel": "It's just a weather balloon. Nothing to see here.",
        "jello": "This old jalopy wouldn't get me to Alpha Centauri.",
        "tr3b": "Never seen this one before. Hmm, it says TR-3B.",
        "strawhat": "This one's a real classic. Aww. There's a big hole in the side. That's really going to wreck the resale value."
    }
}

```

> **[GitHub - mwilber/the-legend-of-zeta: Source code for the presentation: Tile...](https://github.com/mwilber/the-legend-of-zeta/)**
>
> Source code for the presentation: Tile maps and world building with the Phaser framework. - GitHub - mwilber/the-legend-of-zeta: Source code for the presentation: Tile maps and world building with ...

---

<div class="post-metadata">

**Author:** ![samme](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/samme/32/5275_2.png) [@samme](https://phaser.discourse.group/u/samme)\
**Post date:** [November 14, 2021, 6:07pm UTC](https://phaser.discourse.group/t/invalid-json-errors/10655/2 "2021-11-14T18:07:55Z")

</div>

Open the **Network** pane in browser dev tools, find `assets/script.json`, open that URL in the browser. What is it?

---

<div class="post-metadata">

**Author:** ![stanleyseow](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/stanleyseow/32/1190_2.png) [@stanleyseow](https://phaser.discourse.group/u/stanleyseow)\
**Post date:** [November 14, 2021, 6:43pm UTC](https://phaser.discourse.group/t/invalid-json-errors/10655/3 "2021-11-14T18:43:35Z")

</div>

Problem solved, thanks …  
I forgot the import statement at the top
