{"id":27111052,"url":"https://github.com/lunastev/wson-rust","last_synced_at":"2025-04-07T00:54:49.375Z","repository":{"id":285044008,"uuid":"956900614","full_name":"LunaStev/wson-rust","owner":"LunaStev","description":"WSON data serialization parser","archived":false,"fork":false,"pushed_at":"2025-04-03T13:28:19.000Z","size":234,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T17:06:39.997Z","etag":null,"topics":["data","parser","serialization"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/wson_rs/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LunaStev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":null},"created_at":"2025-03-29T04:40:50.000Z","updated_at":"2025-04-03T13:28:22.000Z","dependencies_parsed_at":"2025-03-29T05:37:03.185Z","dependency_job_id":null,"html_url":"https://github.com/LunaStev/wson-rust","commit_stats":null,"previous_names":["lunastev/wson-rust"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LunaStev%2Fwson-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LunaStev%2Fwson-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LunaStev%2Fwson-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LunaStev%2Fwson-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LunaStev","download_url":"https://codeload.github.com/LunaStev/wson-rust/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247574086,"owners_count":20960495,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data","parser","serialization"],"created_at":"2025-04-07T00:54:48.827Z","updated_at":"2025-04-07T00:54:49.364Z","avatar_url":"https://github.com/LunaStev.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Wave Serialization Object Notation\nWSON (Wave Serialized Object Notation) is the default data serialization format for the Wave programming language, designed to overcome the limitations of traditional JSON while providing enhanced functionality and efficiency. WSON maximizes performance while maintaining a human-readable and writable structure, enabling faster and safer data exchange across various environments.\n\n📄 Full syntax documentation: https://wave-lang.dev/docs/wson/\n\n## Installation\n\n```toml\n[dependencies]\nwson_rs = \"0.2.4\"\n```\n\n## Features\n### 1. **Strict Type System**\nWSON maintains clear data types, eliminating the unpredictability caused by JSON's dynamic typing. This ensures type safety during serialization and deserialization.\n\n### 2. **High Performance**\nWSON is designed with minimal overhead, offering fast data processing speeds. This is particularly effective when serializing large amounts of data.\n\n### 3. **Wave-Friendly Design**\nWSON is designed to integrate seamlessly with the Wave programming language and is natively supported by the standard Wave library.\n\n### 4. **Readability and Easy Parsing**\nWhile maintaining a syntax similar to JSON, WSON allows for more concise expressions, making it easier for humans to read and modify. Additionally, it has been optimized for efficient parsing.\n\n### 5. **Support for Various Data Structures**\nWSON supports not only simple key-value pairs but also complex data structures like native arrays, structs, and tuples, enabling more flexible data representation.\n\n## 📚 Example\nvex.ws (WSON format):\n\n```wson\n{\n    name = \"wave_project\",\n    version = 0.1.0,\n    lib = true,\n\n    dependencies = [\n        { name = \"core\", version = 1.0.0 },\n        { name = \"wson\", version = 0.1.1 }\n    ]\n}\n```\nRust usage with wson_rs:\n\n```rust\nuse wson_rs::{loads, dumps, validate, WsonValue};\n\nfn main() {\nlet content = std::fs::read_to_string(\"vex.ws\").unwrap();\n\n    if validate(\u0026content) {\n        let data = loads(\u0026content).unwrap();\n\n        if let Some(WsonValue::String(name)) = data.get(\"name\") {\n            println!(\"Project name: {name}\");\n        }\n\n        let serialized = dumps(\u0026data).unwrap();\n        println!(\"Serialized WSON:\\n{serialized}\");\n    }\n}\n```\n\n## Benchmark\n![output.png](https://github.com/LunaStev/wson-rust/blob/master/.github/output.png)\n\n| Format | Operation  | Elapsed Time (ms) |\n|--------|------------|-------------------|\n| WSON   | Validate   | 4.604             |\n|        | Parse      | 0.219             |\n|        | Dump       | 0.059             |\n| JSON   | Parse      | 0.239             |\n|        | Dump       | 0.072             |\n| YAML   | Parse      | 0.524             |\n|        | Dump       | 0.277             |\n| TOML   | Parse      | 1.306             |\n|        | Dump       | 0.254             |\n\n📊 Benchmark results were generated using `wson_rs` v0.2.1 on a mid-range development machine.\n\n## Conclusion\nWSON reflects the philosophy of the Wave language by aiming for more efficient and powerful data serialization. It addresses the shortcomings of traditional JSON while retaining an intuitive syntax, making it easier for developers to adopt.\n\nGoing forward, WSON will establish itself as the standard data format within the Wave ecosystem — clean, fast, and human-friendly.\n\n📖 Read more at: https://wave-lang.dev/docs/wson/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flunastev%2Fwson-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flunastev%2Fwson-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flunastev%2Fwson-rust/lists"}