{"id":21591012,"url":"https://github.com/tuananh/kong-plugin-xml-json-transformer","last_synced_at":"2026-05-21T04:02:13.152Z","repository":{"id":211069930,"uuid":"727516948","full_name":"tuananh/kong-plugin-xml-json-transformer","owner":"tuananh","description":"An experimental XML to JSON (and vice-versa) transformer plugin for Kong","archived":false,"fork":false,"pushed_at":"2023-12-08T02:19:57.000Z","size":19,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-24T16:28:52.476Z","etag":null,"topics":["json","kong-plugin","xml"],"latest_commit_sha":null,"homepage":"","language":"Lua","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/tuananh.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-05T02:44:37.000Z","updated_at":"2023-12-07T01:53:39.000Z","dependencies_parsed_at":"2024-11-24T16:22:13.757Z","dependency_job_id":"e93fe2de-dcea-435f-94d1-0e4062a6a803","html_url":"https://github.com/tuananh/kong-plugin-xml-json-transformer","commit_stats":null,"previous_names":["tuananh/kong-plugin-xml-json-transformer"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuananh%2Fkong-plugin-xml-json-transformer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuananh%2Fkong-plugin-xml-json-transformer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuananh%2Fkong-plugin-xml-json-transformer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuananh%2Fkong-plugin-xml-json-transformer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tuananh","download_url":"https://codeload.github.com/tuananh/kong-plugin-xml-json-transformer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244198406,"owners_count":20414443,"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":["json","kong-plugin","xml"],"created_at":"2024-11-24T16:22:05.537Z","updated_at":"2026-05-21T04:02:13.041Z","avatar_url":"https://github.com/tuananh.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kong-plugin-xml-json-transformer\n\nAn experimental XML to JSON (and vice-versa) transformer plugin for Kong.\n\nThis repo include 2 plugins:\n\n- `xml-json-transformer` at `./kong/plugins/xml-json-transformer`\n- `json-xml-transformer` at `./kong/plugins/json-xml-transformer`\n\n## Testing\n\nStart Kong instance along with the plugin.\n\n```sh\n$ docker compose up\n```\n\nThis will launch:\n\n- A nginx instance with `./nginx-www` mounted to `/usr/share/nginx/html`. We will use this as test upstream for Kong.\n- A Kong instance in dbless mode. The configuration is loaded from `kong/kong.yml`.\n- The declarative configuration setup a single service for testing.\n\nTest the route to see if the plugin is working properly. For example, let's try XML to JSON trasnformer\n\n```sh\n$ curl --silent http://localhost:8000/xml/medium.xml | jq\n```\n\nExpected output\n\n```json\n{\n  \"slideshow\": {\n    \"_attr\": {\n      \"date\": \"Date of publication\",\n      \"author\": \"Yours Truly\",\n      \"title\": \"Sample Slide Show\"\n    },\n    \"slide\": [\n      {\n        \"_attr\": {\n          \"type\": \"all\"\n        },\n        \"title\": \"Wake up to WonderWidgets!\"\n      },\n      {\n        \"_attr\": {\n          \"type\": \"all\"\n        },\n        \"item\": [\n          {\n            \"1\": \"Why\",\n            \"2\": \"are great\",\n            \"em\": \"WonderWidgets\"\n          },\n          {},\n          {\n            \"1\": \"Who\",\n            \"2\": \"WonderWidgets\",\n            \"em\": \"buys\"\n          }\n        ],\n        \"title\": \"Overview\"\n      }\n    ]\n  }\n}\n```\n\nOr JSON to XML transformer:\n\n```sh\n$ curl --silent http://localhost:8000/json/medium.json\n```\n\nExpected output in XML\n\n```xml\n\u003cslideshow date=\"Date of publication\" title=\"Sample Slide Show\" author=\"Yours Truly\"\u003e\n  \u003cslide\u003e\n    \u003cslide type=\"all\"\u003e\n      \u003ctitle\u003eWake up to WonderWidgets!\u003c/title\u003e\n    \u003c/slide\u003e\n    \u003cslide type=\"all\"\u003e\n        \u003citem\u003e\n          \u003citem\u003e\n            \u003c2\u003eare great\u003c/2\u003e\n            \u003c1\u003eWhy\u003c/1\u003e\n            \u003cem\u003eWonderWidgets\u003c/em\u003e\n          \u003c/item\u003e\n          \u003citem\u003e\n\n          \u003c/item\u003e\n          \u003citem\u003e\n            \u003c2\u003eWonderWidgets\u003c/2\u003e\n            \u003c1\u003eWho\u003c/1\u003e\n            \u003cem\u003ebuys\u003c/em\u003e\n          \u003c/item\u003e\n        \u003c/item\u003e\n        \u003ctitle\u003eOverview\u003c/title\u003e\n    \u003c/slide\u003e\n  \u003c/slide\u003e\n\u003c/slideshow\u003e\n```\n\n## License\n\n[MIT](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftuananh%2Fkong-plugin-xml-json-transformer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftuananh%2Fkong-plugin-xml-json-transformer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftuananh%2Fkong-plugin-xml-json-transformer/lists"}