pipr.tools
Pipes
Clean Email Strip formatting from pasted email for clean plain text Clean AI Output Clean plain text from ChatGPT or AI output Decode & Format JWT Decode a JWT and pretty-print header and payload Word Frequency Count word frequency in text

toml-to-json Convert TOML to JSON

⟐ Data
Input0 chars
Output0 chars

Examples

Convert a TOML config to JSON

Usage
"title = "My App"

[database]
host = "localhost"
port = 5432" | toml-to-json

Convert a Cargo.toml to JSON for tooling

Usage
"[package]
name = "my-crate"
version = "0.1.0"
edition = "202..." | toml-to-json

Convert pyproject.toml settings to JSON

Usage
"[tool.poetry]
name = "my-project"
version = "1.0.0"

[tool.p..." | toml-to-json
View source
async (input)=>{
                try {
                    const TOML = await import('smol-toml').then(async (m)=>{
                        await m.__tla;
                        return m;
                    });
                    return JSON.stringify(TOML.parse(input), null, 2);
                } catch (e) {
                    return `Error: ${e.message}`;
                }
            }