{"id":15168677,"url":"https://github.com/denosaurs/deno_json_op","last_synced_at":"2025-10-01T02:31:01.914Z","repository":{"id":57617806,"uuid":"312260765","full_name":"denosaurs/deno_json_op","owner":"denosaurs","description":"📋 A macro for easing the development of deno plugins","archived":true,"fork":false,"pushed_at":"2020-11-12T17:49:55.000Z","size":9,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-05-21T19:37:27.145Z","etag":null,"topics":["deno","deno-plugin","deno-plugins","macro"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/deno_json_op","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/denosaurs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-12T11:47:49.000Z","updated_at":"2023-01-28T09:04:15.000Z","dependencies_parsed_at":"2022-09-08T11:20:22.313Z","dependency_job_id":null,"html_url":"https://github.com/denosaurs/deno_json_op","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denosaurs%2Fdeno_json_op","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denosaurs%2Fdeno_json_op/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denosaurs%2Fdeno_json_op/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denosaurs%2Fdeno_json_op/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/denosaurs","download_url":"https://codeload.github.com/denosaurs/deno_json_op/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":217590843,"owners_count":16201406,"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":["deno","deno-plugin","deno-plugins","macro"],"created_at":"2024-09-27T06:40:21.452Z","updated_at":"2025-10-01T02:30:56.578Z","avatar_url":"https://github.com/denosaurs.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# deno_json_op\r\n\r\nThis is a crate for easing the building of deno plugins by providing a simple\r\nmacro which automatically converts the first element in the `ZeroCopy` to a\r\n`serde_json::Value` and the `Result\u003c_, _\u003e` to a json object.\r\n\r\n## Usage\r\n\r\n```rust\r\nuse deno_core::error::AnyError;\r\n\r\nuse deno_core::plugin_api::Interface;\r\nuse deno_core::plugin_api::Op;\r\nuse deno_core::plugin_api::ZeroCopyBuf;\r\n\r\nuse deno_core::serde_json::Value;\r\nuse deno_core::serde_json::json;\r\n\r\nuse deno_json_op::json_op;\r\n\r\n#[no_mangle]\r\npub fn deno_plugin_init(interface: \u0026mut dyn Interface) {\r\n  interface.register_op(\"test\", op_test);\r\n}\r\n\r\n#[json_op]\r\nfn op_test(_interface: \u0026mut dyn Interface, val: Value, _zero_copy: \u0026mut [ZeroCopyBuf]) -\u003e Result\u003cValue, AnyError\u003e {\r\n  Ok(json!({\r\n    \"hello\": val\r\n  }))\r\n}\r\n```\r\n\r\n## Other\r\n\r\n### Related\r\n\r\n- [calcite](https://github.com/Srinivasa314/calcite) - similar project\r\n\r\n### Contribution\r\n\r\nPull request, issues and feedback are very welcome. Code style is formatted with\r\n`deno fmt` and commit messages are done following Conventional Commits spec.\r\n\r\n### Licence\r\n\r\nCopyright 2020-present, the denosaurs team. All rights reserved. MIT license.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenosaurs%2Fdeno_json_op","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdenosaurs%2Fdeno_json_op","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenosaurs%2Fdeno_json_op/lists"}