Skip to content

ryo8000/xml-yaml-json-converter

Repository files navigation

🌀 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:
  • 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

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

name: John
age: 30

🛠 Development

Prerequisites

  • Node.js 22+
  • npm
  • AWS CLI (for deployment)
  • Terraform (for infrastructure)

Installation

npm install

Test

npm test

🚀 Deployment

Deploy Infrastructure

./deploy.sh

Destroy Infrastructure

./destroy.sh

📜 License

This project is licensed under the MIT License.

About

API for converting between XML, JSON, and YAML formats

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors