Polyconv

Conversions

Supported public conversion paths in the current Polyconv packages.

Polyconv exposes focused converters rather than a single all-format package. The current package APIs cover JSON output formats and TOML to JSON.

SourceTargetCLITypeScript library
JSONXML@polyconv/cli@polyconv/json
JSONYAML@polyconv/cli@polyconv/json
JSONTOML@polyconv/cli@polyconv/json
JSONCSV / TSV@polyconv/cli@polyconv/json
JSONINI / ENV@polyconv/cli@polyconv/json
JSONMarkdown / HTML tables@polyconv/cli@polyconv/json
JSONURL query string@polyconv/cli@polyconv/json
TOMLJSON@polyconv/cli@polyconv/toml

JSON Outputs

@polyconv/json converts JSON strings to XML, YAML, TOML, CSV, TSV, INI, ENV, Markdown tables, HTML tables, and URL query strings. It also formats and minifies JSON.

import {
  formatJson,
  jsonToCsv,
  jsonToQueryString,
  jsonToToml,
  jsonToXml,
  jsonToYaml,
} from "@polyconv/json";

TOML Output

@polyconv/toml converts TOML strings to JSON with optional pretty output and recursive key sorting.

import { tomlToJson } from "@polyconv/toml";

Input Contracts

JSON helpers accept JSON as a string and throw ConversionError for invalid or empty input.

Table converters accept one plain object or an array of plain objects. Cell values must be strings, numbers, booleans, or null.

INI and ENV accept top-level objects. Query strings accept scalar values and arrays of scalar values, emitting repeated keys for arrays.

On this page