TySON, short for TypeScript Object Notation, leverages TypeScript as a configuration language. It is designed to be a subset of TypeScript, making it useful as an embeddable configuration language that generates JSON. TySON files, identified by the .tson
extension, combine JSON's structure with TypeScript's features such as comments, types, and basic logic.
The primary goal of TySON is to enable all major programming languages to read configurations written in TypeScript using native libraries. The initial implementation is written in pure Go, with plans for a Rust implementation. TySON offers several benefits:
- Type Safety: Utilizes TypeScript's type system to ensure valid configurations.
- Programmability: Allows for programmatic generation of configurations, supporting imports, overrides, and reusable functions.
- Enhanced Syntax: Supports comments, trailing commas, multi-line strings, and more, offering a more user-friendly syntax compared to JSON.
TySON aims to address the limitations of traditional configuration formats like JSON, YAML, and TOML by providing a type-safe, programmable, and familiar syntax without requiring users to learn a new language. It also includes a command-line tool for converting .tson
files to JSON, making it easier for developers to integrate into their workflows.
TySON is currently available as an early developer preview, with a Go library and command-line tool. Future plans include a formal specification and implementations for other languages. Its main advantage lies in using TypeScript as the underlying language, allowing developers to leverage existing editor support and ecosystem familiarity.
Pricing
Pricing information is not available