zoko-cli-0.1.2 is not a library.
Zoko
A JSON-like format for data storing
Zoko is a human-readable data format that extends JSON with additional features like comments, trailing commas, and multiple string types. It's designed for configuration files, data storage, and any use case where you need the flexibility of JSON with better readability.
Features
- Human-Readable Syntax: Clean and intuitive syntax that's easy to read and write
- Comments: Single-line (
//) and multi-line (/* */) comments for better documentation - Trailing Commas: No need to worry about trailing commas - they're fully supported
- Multiple String Types: Double-quoted, single-quoted, and multi-line backtick strings
- JSON & YAML Compatible: Easy conversion between Zoko, JSON, and YAML formats
- Order Preservation: Maintains the original order of objects and maps using IndexMap
- Type Safe: Full Rust API with strong typing and error handling
- CLI Tools: Command-line interface for parsing, validation, and formatting
Installation
You can install Zoko CLI using Zoi:
From Source
# Clone the repository
# Build the project
# The CLI binary will be available at target/release/zoko-cli
Using Cargo
Add to Your Rust Project
Quick Start
Create a Zoko File
Create a file named config.zo:
"My Application",
"1.0.0",
true,
{
"localhost",
5432,
},
["production", "api"],
Parse and Validate
# Validate a Zoko file
# Parse to JSON
# Parse to YAML
# Format a Zoko file
Use in Rust
use ;
Example Zoko File
// Package metadata
"@Main/Hello",
"main",
"Production",
"Release",
"1.0.0",
"Hello package for Zoil",
// Tags and metadata
["Hello", "Zoil"],
"https://hello.nel.co",
// Dependencies with complex structures
[
{name: "Hola", version: "1.0.2"},
{
"@German/Hallo",
"main",
"latest",
},
],
/* Configuration block
/
{
false,
30,
3,
[
{host: "primary.example.com", port: 8080},
{host: "backup.example.com", port: 8080},
],
},
CLI Commands
# Parse and validate
# Format files
# Check syntax