{"id":51524239,"url":"https://github.com/code0-tech/lupus","last_synced_at":"2026-07-08T19:01:35.903Z","repository":{"id":368191287,"uuid":"1233737266","full_name":"code0-tech/lupus","owner":"code0-tech","description":"Lossless conversion library between data formats (JSON, XML, Proto, Binary...)","archived":false,"fork":false,"pushed_at":"2026-06-29T12:47:35.000Z","size":57,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-29T13:23:25.962Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/code0-tech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-09T09:45:07.000Z","updated_at":"2026-06-29T12:43:19.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/code0-tech/lupus","commit_stats":null,"previous_names":["code0-tech/lupus"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/code0-tech/lupus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code0-tech%2Flupus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code0-tech%2Flupus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code0-tech%2Flupus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code0-tech%2Flupus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/code0-tech","download_url":"https://codeload.github.com/code0-tech/lupus/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/code0-tech%2Flupus/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35275246,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-08T02:00:06.796Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2026-07-08T19:01:35.049Z","updated_at":"2026-07-08T19:01:35.883Z","avatar_url":"https://github.com/code0-tech.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lupus\n\nLupus is a Rust conversion library for moving data between structured data,\nmarkup, text, and binary formats through a shared intermediate representation.\n\nThe workspace also contains a small HTTP debugging application for testing\nconversions interactively.\n\n## Supported formats\n\n| Format | Decode | Encode | Notes |\n| --- | --- | --- | --- |\n| JSON | Yes | Yes | Supports all internal data values |\n| XML | Yes | Yes | Preserves elements, attributes, and text |\n| CSV | Yes | Yes | Flat rows with identical string fields |\n| HTTP Form | Yes | Yes | Flat objects with string values |\n| Protobuf | Yes | Yes | Uses `tucana::shared::Value` |\n| Text | Yes | Yes | UTF-8 text and text extraction |\n\nConversions that cannot preserve the source information return an\n`InformationLoss` error instead of silently discarding or coercing values.\n\nStructured data can optionally be validated with a standard JSON Schema Draft\n2020-12 document. Validation works for data decoded from JSON, XML, CSV, HTTP\nforms, and Protobuf.\n\n## Run the debugging frontend\n\n```sh\ncargo run -p lupus-web\n```\n\nOpen \u003chttp://127.0.0.1:7878\u003e. Set `PORT` to use another port:\n\n```sh\nPORT=8080 cargo run -p lupus-web\n```\n\nThe frontend includes sample inputs, formatted output, and visible decoding,\nencoding, unsupported-format, and information-loss errors.\n\nProtobuf input and output use Tucana's generated JSON representation of\n`tucana::shared::Value` in the frontend.\n\n## Library usage\n\n```rust\nuse lupus::engine::Engine;\nuse lupus::format::Format;\nuse lupus::formats::{JsonCodec, XmlCodec};\nuse lupus::schema::{DecodeContext, EncodeContext};\n\nlet mut engine = Engine::new();\nengine.register(JsonCodec);\nengine.register(XmlCodec);\n\nlet output = engine.convert(\n    br#\"{\"user\":{\"@id\":\"7\",\"name\":\"Ada\"}}\"#,\n    Format::Json,\n    Format::Xml,\n    \u0026DecodeContext::default(),\n    \u0026EncodeContext { pretty: true },\n)?;\n\nassert_eq!(\n    String::from_utf8(output)?,\n    \"\u003cuser id=\\\"7\\\"\u003e\\n  \u003cname\u003eAda\u003c/name\u003e\\n\u003c/user\u003e\"\n);\n# Ok::\u003c(), Box\u003cdyn std::error::Error\u003e\u003e(())\n```\n\nRegister only the codecs required by the application. An unregistered format\nreturns `ConvertError::UnsupportedFormat`.\n\n## Format rules\n\n### JSON Schema validation\n\nCall `Engine::validate` with the schema, source format, and input bytes:\n\n```rust\nuse lupus::schema::{DecodeContext, JsonSchema};\n\nlet schema = JsonSchema {\n    raw: r#\"{\n        \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n        \"type\": \"object\",\n        \"required\": [\"name\"],\n        \"properties\": {\n            \"name\": { \"type\": \"string\", \"minLength\": 1 }\n        },\n        \"additionalProperties\": false\n    }\"#\n    .to_string(),\n};\n\nengine.validate(\n    br#\"{\"name\":\"Ada\"}\"#,\n    Format::Json,\n    \u0026schema,\n    \u0026DecodeContext::default(),\n)?;\n```\n\nInvalid schema documents produce a decoding error. Objects that do not satisfy\nthe schema produce a validation error containing all reported instance paths.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode0-tech%2Flupus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcode0-tech%2Flupus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode0-tech%2Flupus/lists"}