https://github.com/ryo8000/xml-yaml-json-converter
API for converting between XML, JSON, and YAML formats
https://github.com/ryo8000/xml-yaml-json-converter
aws json terraform typescript xml yaml
Last synced: 3 months ago
JSON representation
API for converting between XML, JSON, and YAML formats
- Host: GitHub
- URL: https://github.com/ryo8000/xml-yaml-json-converter
- Owner: ryo8000
- License: mit
- Created: 2025-06-03T09:17:18.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2026-04-08T00:13:53.000Z (3 months ago)
- Last Synced: 2026-04-08T02:23:41.035Z (3 months ago)
- Topics: aws, json, terraform, typescript, xml, yaml
- Language: TypeScript
- Homepage:
- Size: 709 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🌀 XML / YAML / JSON Converter
This project provides a serverless API that enables conversion between XML, YAML and JSON data formats. It is built using AWS Lambda and API Gateway, with infrastructure managed via Terraform.
---
## 📦 Tech Stack
* **Language:** TypeScript (Node.js)
* **Conversion Libraries:**
* [`fast-xml-parser`](https://github.com/NaturalIntelligence/fast-xml-parser)
* [`js-yaml`](https://github.com/nodeca/js-yaml)
* **Infrastructure:** AWS Lambda, API Gateway (REST API), Terraform
---
## 📋 API Usage
### Endpoint
```
POST /convert?from={source_format}&to={target_format}
```
### Parameters
- `from`: Source format (json, xml, yaml)
- `to`: Target format (json, xml, yaml)
### Example Request
```bash
curl -X POST "https://api-gateway-url/dev/convert?from=json&to=yaml" \
-H "Content-Type: application/json" \
-d '{"name": "John", "age": 30}'
```
### Example Response
```yaml
name: John
age: 30
```
---
## 🛠Development
### Prerequisites
- Node.js 22+
- npm
- AWS CLI (for deployment)
- Terraform (for infrastructure)
### Installation
```bash
npm install
```
### Test
```bash
npm test
```
---
## 🚀 Deployment
### Deploy Infrastructure
```bash
./deploy.sh
```
### Destroy Infrastructure
```bash
./destroy.sh
```
---
## 📜 License
This project is licensed under the [MIT License](./LICENSE).