# Is a TOML parser something that node-red wishes to support or has planned?

**URL:** <https://discourse.nodered.org/t/is-a-toml-parser-something-that-node-red-wishes-to-support-or-has-planned/62098>\
**Category:** General\
**Created:** [3 May 2022 07:49 UTC](https://discourse.nodered.org/t/is-a-toml-parser-something-that-node-red-wishes-to-support-or-has-planned/62098 "2022-05-03T07:49:29Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shan](https://avatars.discourse-cdn.com/v4/letter/s/7ab992/32.png) [@Shan](https://discourse.nodered.org/u/Shan)\
**Post date:** [3 May 2022 07:49 UTC](https://discourse.nodered.org/t/is-a-toml-parser-something-that-node-red-wishes-to-support-or-has-planned/62098/1 "2022-05-03T07:49:29Z")

</div>

# Potential Feature Request

Since the node-RED eco-system has the most common serialization parsers, namely,

- XML
- JSON
- YAML

Would a possible parser be planned for **TOML**?

## Information

[Tom's Obvious Markup Language](https://toml.io/en/)

> TOML aims to be a minimal configuration file format that's easy to read due to obvious semantics. TOML is designed to map unambiguously to a hash table. TOML should be easy to parse into data structures in a wide variety of languages.

### Implementations

based on the [TOML's Wiki](https://github.com/toml-lang/toml/wiki#implementations) there are implementations for `v1.0.0` compliant parsers

Based on some quick reviews: [https://www.npmjs.com/package/@ltd/j-toml](https://www.npmjs.com/package/@ltd/j-toml) is the one maintained well.

Is there something planned?

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [3 May 2022 10:04 UTC](https://discourse.nodered.org/t/is-a-toml-parser-something-that-node-red-wishes-to-support-or-has-planned/62098/2 "2022-05-03T10:04:15Z")

</div>

Not planned (as not heard of it until now 🙂 ).... but certainly could be a contribute node if someone wanted to create it.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [3 May 2022 22:36 UTC](https://discourse.nodered.org/t/is-a-toml-parser-something-that-node-red-wishes-to-support-or-has-planned/62098/3 "2022-05-03T22:36:45Z")

</div>

Agree with Dave that it would make a good contributed node. You would probably do well to clone the YAML node and adjust it to use a TOML library. There appear to be at least a couple of TOML libraries for Node.js.

---

<div class="post-metadata">

**Author:** ![Shan](https://avatars.discourse-cdn.com/v4/letter/s/7ab992/32.png) [@Shan](https://discourse.nodered.org/u/Shan)\
**Post date:** [4 May 2022 21:25 UTC](https://discourse.nodered.org/t/is-a-toml-parser-something-that-node-red-wishes-to-support-or-has-planned/62098/4 "2022-05-04T21:25:56Z")

</div>

@dceejay and @TotallyInformation I have actually tried it out and have succesfully made a TOML parser node. I only ask for some co-ordination with the core team to help sending a Pull Request / Patch upstream.

Maybe @knolleary or @Steve-Mcl can help answer some questions:

There is also some query regarding using the **Template** Node and providing some **TOML Syntax Highlighting** within it.

I was trying find some documentation on contributing the code, but I am not sure what the general pattern is:

- Which `package.json` files to change when working with core. There seems to be two or more in the complete project.
- How to adapt the **Template** Node to have TOML highlight
- What kind of test should I write?
- is a package with `@` allowed? e.g. `@<username>/toml:<version>`
- Do I have to open an Issue with description before sending a Pull Request?
- Do I need to showcase the node to the core team members in a call or on some forum first?

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [4 May 2022 21:35 UTC](https://discourse.nodered.org/t/is-a-toml-parser-something-that-node-red-wishes-to-support-or-has-planned/62098/5 "2022-05-04T21:35:38Z")

</div>

Hi

you don't need to raise a PR at all - you can create and publish your own node independently - [Creating Nodes : Node-RED](https://nodered.org/docs/creating-nodes/)  
And then you can name it as per the packaging guidelines (and yes it can be namespaced)

---

<div class="post-metadata">

**Author:** ![Shan](https://avatars.discourse-cdn.com/v4/letter/s/7ab992/32.png) [@Shan](https://discourse.nodered.org/u/Shan)\
**Post date:** [5 May 2022 06:37 UTC](https://discourse.nodered.org/t/is-a-toml-parser-something-that-node-red-wishes-to-support-or-has-planned/62098/6 "2022-05-05T06:37:35Z")

</div>

Oh! okay, I thought it would be be nice to have it under all the standard parsers palette. Either way, I will be able to provide something to the community

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [5 May 2022 08:04 UTC](https://discourse.nodered.org/t/is-a-toml-parser-something-that-node-red-wishes-to-support-or-has-planned/62098/7 "2022-05-05T08:04:23Z")

</div>

You can still do that, each custom node chooses what category it wants to live under.

---

<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 July 2022 08:05 UTC](https://discourse.nodered.org/t/is-a-toml-parser-something-that-node-red-wishes-to-support-or-has-planned/62098/8 "2022-07-04T08:05:03Z")

</div>

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