zoko-cli-0.1.0 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 Compatible: Easy conversion between Zoko and JSON 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
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:
name: "My Application",
version: "1.0.0",
debug: true,
database: {
host: "localhost",
port: 5432,
},
tags: ["production", "api"],
Parse and Validate
# Validate a Zoko file
# Parse to JSON
# Format a Zoko file
Use in Rust
use ;
Example Zoko File
// Package metadata
name: "@Main/Hello",
channel: "main",
branch: "Production",
status: "Release",
version: "1.0.0",
description: "Hello package for Zoil",
// Tags and metadata
tags: ["Hello", "Zoil"],
website: "https://hello.nel.co",
// Dependencies with complex structures
dependencies: [
{name: "Hola", version: "1.0.2"},
{
name: "@German/Hallo",
channel: "main",
version: "latest",
},
],
/* Configuration block
with detailed comments */
config: {
debug: false,
timeout: 30,
retries: 3,
servers: [
{host: "primary.example.com", port: 8080},
{host: "backup.example.com", port: 8080},
],
},
CLI Commands
# Parse and validate
# Format files
# Check syntax