json2toon.co
Secure

Installations

TOON is available in multiple languages. Choose your preferred ecosystem and start integrating TOON into your projects today.

Community

Installation

Add the official github.com/alpkeskin/gotoon package to your project

go get github.com/alpkeskin/gotoon

Usage Example

Quick start guide for encoding and decoding TOON format in Go (Community)

package main

import (
    "fmt"
    "log"

    "github.com/alpkeskin/gotoon"
)

func main() {
    data := map[string]interface{}{
        "users": []map[string]interface{}{
            {"id": 1, "name": "Alice", "role": "admin"},
            {"id": 2, "name": "Bob", "role": "user"},
        },
    }

    encoded, err := gotoon.Encode(data)
    if err != nil {
        log.Fatal(err)
    }

    fmt.Println(encoded)
}