# Who's heard of this new \`TOON\` structure? Thoughts?

**URL:** <https://discourse.nodered.org/t/whos-heard-of-this-new-toon-structure-thoughts/99741>\
**Category:** General\
**Created:** [21 November 2025 22:41 UTC](https://discourse.nodered.org/t/whos-heard-of-this-new-toon-structure-thoughts/99741 "2025-11-21T22:41:23Z")\
**Posts on this page:** 14\
**Page:** 2

<div class="post-metadata">

**Author:** ![omrid](https://avatars.discourse-cdn.com/v4/letter/o/77aa72/32.png) [@omrid](https://discourse.nodered.org/u/omrid)\
**Post date:** [22 November 2025 22:57 UTC](https://discourse.nodered.org/t/whos-heard-of-this-new-toon-structure-thoughts/99741/21 "2025-11-22T22:57:07Z")

</div>

> [@TotallyInformation](#):
>
> And that's the point isn't it. You can code a JavaScript object as JSON and it will work as expected. The difference only really matters once you want to move that data out of native JavaScript.

I believe the idea here was not to try execute these objects, but use (a subset of) the JS syntax to define the data structure with less double-quotes and with JSONC-like comments. It will still need an equivalent of `JSON.parse()` to become a real object in JS.

---

<div class="post-metadata">

**Author:** ![ThingsTinkerer](https://avatars.discourse-cdn.com/v4/letter/t/91b2a8/32.png) [@ThingsTinkerer](https://discourse.nodered.org/u/ThingsTinkerer)\
**Post date:** [23 November 2025 02:51 UTC](https://discourse.nodered.org/t/whos-heard-of-this-new-toon-structure-thoughts/99741/22 "2025-11-23T02:51:18Z")

</div>

If JSON can be used everywhere, there is nothing preventing that js object could be used everywhere. If you can parse a JSON, why on earth wouldn't you be able to parse a js object? For the untrained eye, they are the same. For the trained eye, one has more quotes than other. Just because one syntax has more quotes doesn't make it unparsable by all other languages. Js object is much cleaner to read AND write than JSON. I am currently making a config file for a flow. This file has to be in json. I am currently using JSON.parse. I'd MUCH rather have it in js object. Cleaner to write, cleaner to read. Hence why I wrote "I'd love to be able to parse such a js object from file in NR". I would prefer to read a js file and parse it, not json.

I guess this is a prime example of the limitation of imagination I experienced earlier.

---

<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:** [24 November 2025 12:00 UTC](https://discourse.nodered.org/t/whos-heard-of-this-new-toon-structure-thoughts/99741/23 "2025-11-24T12:00:41Z")

</div>

> [@ThingsTinkerer](#):
>
> If you can parse a JSON, why on earth wouldn't you be able to parse a js object?

I think we are talking at cross purposes. A javascript object is something that exists in memory when running javascript. I realise now that you are talking about the syntax used in javascript code to describe an object. So in fact you are effectively talking about a 'better' JSON syntax.

On the trailing comma question inside an array, I agree that it is often convenient to allow the extra comma.  
In your improved JSON how would you like to be able to define an object containing a property `my-property`?

---

<div class="post-metadata">

**Author:** ![ThingsTinkerer](https://avatars.discourse-cdn.com/v4/letter/t/91b2a8/32.png) [@ThingsTinkerer](https://discourse.nodered.org/u/ThingsTinkerer)\
**Post date:** [24 November 2025 17:46 UTC](https://discourse.nodered.org/t/whos-heard-of-this-new-toon-structure-thoughts/99741/24 "2025-11-24T17:46:09Z")

</div>

I can sacrifice that for a simple js oriented object notation improvement of JSON! I'll trade dashes in prop names all day for comments and trailing commas (and less quotes too). Of course it would break a gazillion existing schemas from people who enjoy such names... but I'd sacrifice that too haha 🤪 Perhaps a middle ground is to allow quotes (like current JSON) for those pesky prop names?

Btw those quotes gave us several data points in db named "energy\_consumption " (see the trailing space?) due to how fragile it is to write (in NR btw). Added a filter (also in NR) to prevent it (abort + log), so no more problem.

> [@ThingsTinkerer](#):
>
> Perhaps there are loopholes to this.  
> ...  
> I'm perfectly happy about having limitations like no functions, no funky var names etc.

---

<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:** [24 November 2025 20:46 UTC](https://discourse.nodered.org/t/whos-heard-of-this-new-toon-structure-thoughts/99741/25 "2025-11-24T20:46:04Z")

</div>

> [@ThingsTinkerer](#):
>
> I can sacrifice that for a simple js oriented object notation improvement of JSON

You realise that the way to handle special characters in properties in javascript is for example  
`let msg.payload = {"my-property": 7}`  
in other words it uses the JSON syntax. All that javascript does is to make the quotes optional if the property name does not contain special characters.

---

<div class="post-metadata">

**Author:** ![ThingsTinkerer](https://avatars.discourse-cdn.com/v4/letter/t/91b2a8/32.png) [@ThingsTinkerer](https://discourse.nodered.org/u/ThingsTinkerer)\
**Post date:** [24 November 2025 20:51 UTC](https://discourse.nodered.org/t/whos-heard-of-this-new-toon-structure-thoughts/99741/26 "2025-11-24T20:51:32Z")

</div>

Yup. That optionality makes me so much happier working with the syntax of objects in javascript compared to JSON (particularly the reading & writing part). So much so I've added nrlint rules to notify useless quotes (unless these pitfalls we discussed and more). And formatting to remove as much of it as possible. And if that's inadequate, I got a full eslint & prettier setup in vscode which can completely change JSON to js object syntax (+ preferred formatting). Thanks for pointing out my inaccurate wording, I should have used correct terminology as I have studied and learned these terms in my education.

Which syntax do you prefer? Or don't mind either or?

---

<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:** [24 November 2025 21:13 UTC](https://discourse.nodered.org/t/whos-heard-of-this-new-toon-structure-thoughts/99741/27 "2025-11-24T21:13:52Z")

</div>

Preference doesn't really come into it. JSON is a standard interchange format that is used in a vast number of applications around the world. For the likes of you and I it is impossible to change that. Similarly we are not going to affect the syntax of object descriptions in javascript. So when writing JS code we have to use the javascript syntax and when passing data in text form out of javascript it would generally be foolish not to use JSON as it is so widely understood.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [24 November 2025 22:33 UTC](https://discourse.nodered.org/t/whos-heard-of-this-new-toon-structure-thoughts/99741/28 "2025-11-24T22:33:11Z")

</div>

Thanks.

That explains a bit for me which I never fully understood.

---

<div class="post-metadata">

**Author:** ![ThingsTinkerer](https://avatars.discourse-cdn.com/v4/letter/t/91b2a8/32.png) [@ThingsTinkerer](https://discourse.nodered.org/u/ThingsTinkerer)\
**Post date:** [24 November 2025 22:47 UTC](https://discourse.nodered.org/t/whos-heard-of-this-new-toon-structure-thoughts/99741/29 "2025-11-24T22:47:12Z")

</div>

And this is why I said:

> [@ThingsTinkerer](#):
>
> I guess this is a prime example of the limitation of imagination I experienced earlier.

😃

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [24 November 2025 22:49 UTC](https://discourse.nodered.org/t/whos-heard-of-this-new-toon-structure-thoughts/99741/30 "2025-11-24T22:49:23Z")

</div>

Sorry, my brain is not working just now.

I'm not sure how to parse that.

My imagination is _out there_ some/most of the time.

I just never _saw/understood_ that.  
But now I know. 🙂

---

<div class="post-metadata">

**Author:** ![dubnemo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dubnemo/32/38759_2.png) [@dubnemo](https://discourse.nodered.org/u/dubnemo)\
**Post date:** [27 November 2025 03:06 UTC](https://discourse.nodered.org/t/whos-heard-of-this-new-toon-structure-thoughts/99741/31 "2025-11-27T03:06:10Z")

</div>

Glorified-CSV.  
I can't see how it frees up memory during processing. But good for only for transport of large files.

---

<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:** [27 November 2025 07:31 UTC](https://discourse.nodered.org/t/whos-heard-of-this-new-toon-structure-thoughts/99741/32 "2025-11-27T07:31:09Z")

</div>

> [@dubnemo](#):
>
> I can't see how it frees up memory during processing.

Is there a suggestion that it does do that?

---

<div class="post-metadata">

**Author:** ![kbserm](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kbserm/32/104624_2.png) [@kbserm](https://discourse.nodered.org/u/kbserm)\
**Post date:** [27 November 2025 14:19 UTC](https://discourse.nodered.org/t/whos-heard-of-this-new-toon-structure-thoughts/99741/33 "2025-11-27T14:19:52Z")

</div>

Thanks for the great video. The history is much longer 🙂

This format makes perfect sense when LLM API start charging by tokens in/out.

---

<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:** [25 February 2026 14:20 UTC](https://discourse.nodered.org/t/whos-heard-of-this-new-toon-structure-thoughts/99741/34 "2026-02-25T14:20:16Z")

</div>

Closed on 25 February 2026 14:20 UTC

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

[Previous page](https://discourse.nodered.org/t/whos-heard-of-this-new-toon-structure-thoughts/99741.md?page=1)
