toonkit2
Type-SafeCompactHuman-ReadableMIT

toonkit2

A parser & serializer for TOON — Typed Object Oriented Notation. Transform JSON to compact TOON format and back with built-in type awareness.

$ npm install toonkit2
Docs → Hono Integration
🔗

Hono Integration

Middleware for Hono apps

Use the `toon` middleware for Hono to parse and respond with TOON.

Hono Middleware
import { Hono } from "hono";
import { toon } from "toonkit2/hono";

const app = new Hono();
app.use("*", toon());

app.post("/devices", (c) => c.json({ ok: true, received: c.req.toon() }));