# Nrlint@1.0.1: What is wrong with this JSON?

**URL:** <https://discourse.nodered.org/t/nrlint-1-0-1-what-is-wrong-with-this-json/48658>\
**Category:** General\
**Created:** [20 July 2021 13:10 UTC](https://discourse.nodered.org/t/nrlint-1-0-1-what-is-wrong-with-this-json/48658 "2021-07-20T13:10:59Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![rei\_vilo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rei_vilo/32/162_2.png) [@rei\_vilo](https://discourse.nodered.org/u/rei_vilo)\
**Post date:** [20 July 2021 13:10 UTC](https://discourse.nodered.org/t/nrlint-1-0-1-what-is-wrong-with-this-json/48658/1 "2021-07-20T13:10:59Z")

</div>

I am testing nrlint@1.0.1 with node-red@2.0.0.

The inject node displays an exclamation mark with `linting error`.

 ![Capture d’écran de 2021-07-20 15-03-52](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/3/4359c649191e4316f8342c477549406e3673b08a.png)

However, the JSON seems to be correct as it is accepted.

 ![Capture d’écran de 2021-07-20 15-04-23](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/1/0181247d2fdf791498772400f3fb8b442ca08aed.png)

```auto
{
    "Epoch": 1583082974,
    "Report": [
        {
            "Data": {
                "Name": "Indoor",
                "Epoch": 1583082500,
                "Temperature": 23.1,
                "Humidity": 75.5,
                "RSSI": -85
            }
        },
        {
            "Data": {
                "Name": "Outdoor",
                "Epoch": 1583082648,
                "Temperature": 27.6,
                "Humidity": 57.1,
                "RSSI": -82
            }
        }
    ]
}

```

 ![Capture d’écran de 2021-07-20 15-04-05](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/2/8204f494d408e25a7e0822ded95040e68dafd211.png)

What is wrong with this JSON? Thank you!

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [20 July 2021 13:25 UTC](https://discourse.nodered.org/t/nrlint-1-0-1-what-is-wrong-with-this-json/48658/2 "2021-07-20T13:25:21Z")

</div>

Can you export the inject node and paste it here please so we can check it.

---

<div class="post-metadata">

**Author:** ![rei\_vilo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rei_vilo/32/162_2.png) [@rei\_vilo](https://discourse.nodered.org/u/rei_vilo)\
**Post date:** [20 July 2021 13:53 UTC](https://discourse.nodered.org/t/nrlint-1-0-1-what-is-wrong-with-this-json/48658/3 "2021-07-20T13:53:53Z")

</div>

Sure, please find the export from the inject node:

```auto
[
    {
        "id": "c9e75916.98c388",
        "type": "inject",
        "z": "6bda371c.9dc02",
        "name": "",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "{\"Epoch\":1583082974,\"Report\":[{\"Data\":{\"Name\":\"Indoor\",\"Epoch\":1583082500,\"Temperature\":23.1,\"Humidity\":75.5,\"RSSI\":-85}},{\"Data\":{\"Name\":\"Outdoor\",\"Epoch\":1583082648,\"Temperature\":27.6,\"Humidity\":57.1,\"RSSI\":-82}}]}",
        "payloadType": "json",
        "x": 160,
        "y": 100,
        "wires": [
            [
                "4c3e4db.a99d6b4",
                "826a0b68.9cd1a8"
            ]
        ]
    }
]

```

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [20 July 2021 13:54 UTC](https://discourse.nodered.org/t/nrlint-1-0-1-what-is-wrong-with-this-json/48658/4 "2021-07-20T13:54:17Z")

</div>

If you open the linter sidebar panel it will tell you.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/1/01933890c711e7e9dcee1b94593b07f20b4075e2.png)

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [20 July 2021 13:55 UTC](https://discourse.nodered.org/t/nrlint-1-0-1-what-is-wrong-with-this-json/48658/5 "2021-07-20T13:55:09Z")

</div>

You can also access the sidebar by clicking on the lint summary in the footer of the workspace:

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/b/4be47ae075f7c32b40aa69db34bcac044dbb4753.png)

---

<div class="post-metadata">

**Author:** ![philosoma](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/philosoma/32/45241_2.png) [@philosoma](https://discourse.nodered.org/u/philosoma)\
**Post date:** [20 July 2021 14:23 UTC](https://discourse.nodered.org/t/nrlint-1-0-1-what-is-wrong-with-this-json/48658/6 "2021-07-20T14:23:43Z")

</div>

Could it be possible to highlight the error in the sidebar by clicking the yellow icon on the node? I had over 500 to start with, was difficult to find what was going on.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [20 July 2021 14:24 UTC](https://discourse.nodered.org/t/nrlint-1-0-1-what-is-wrong-with-this-json/48658/7 "2021-07-20T14:24:45Z")

</div>

> [@philosoma](#):
>
> Could it be possible to highlight the error in the sidebar by clicking the yellow icon on the node?

Not at the moment, otherwise I would have implemented it 🙂

Needs some changes in the core Node-RED to support clickable actions on node annotations.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [20 July 2021 15:17 UTC](https://discourse.nodered.org/t/nrlint-1-0-1-what-is-wrong-with-this-json/48658/8 "2021-07-20T15:17:34Z")

</div>

It doesn't seem to be working too well for me. I have 460 errors or thereabouts, mostly grid alignment errors. When I open the linter settings and clear the checkbox for that error then all errors disappear (including errors other than alignment) though the error count stays the same. Running Firefox.

---

<div class="post-metadata">

**Author:** ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)\
**Post date:** [20 July 2021 15:46 UTC](https://discourse.nodered.org/t/nrlint-1-0-1-what-is-wrong-with-this-json/48658/9 "2021-07-20T15:46:41Z")

</div>

By turning off the align-to-grid rule, the other rules do fail.  
Also it seems to me that flows at the disabled tab also linted. Don't know if it is intentional or bug but doesn't seem most logical thing...

Computer has crashed twice now, trying to figure out if there is something related. Took the forced windows updates just before installing the NR 2.0.1 and linter and debbuger.

Edit 2  
Crashes are not related (got incomplete windows update) but behavior still remains.  
Change of rule set, specially the align-to-grid rule do break other rules  
By refresh the browser tab when align-to-grid rule is not enabled, none of rules apply.

Edit 3  
Errors in console

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/6/263641eb952921cc9672c43188cce0cfd7982b35.png)

Turning of the grid rule gives following

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/a/bac456284c2154d9e3b74165881baa958d23558d.png)

Which ends with:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/c/fc9bfc86e6f2ff69c6cc3a41e459409e9e692031.png)

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [21 July 2021 11:02 UTC](https://discourse.nodered.org/t/nrlint-1-0-1-what-is-wrong-with-this-json/48658/10 "2021-07-21T11:02:39Z")

</div>

nrlint@1.0.2 now published that fixes the crash when alignToGrid rule is disabled.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [4 August 2021 11:02 UTC](https://discourse.nodered.org/t/nrlint-1-0-1-what-is-wrong-with-this-json/48658/11 "2021-08-04T11:02:53Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
