An open API service indexing awesome lists of open source software.

https://github.com/bhanurp/json-yaml-converter

simple json <-> yaml converter
https://github.com/bhanurp/json-yaml-converter

json prettier yaml

Last synced: 4 months ago
JSON representation

simple json <-> yaml converter

Awesome Lists containing this project

README

          

# JSON to YAML Converter

## Description

The **JSON to YAML Converter** is a simple, user-friendly web application that allows users to quickly convert between JSON and YAML formats. This tool supports automatic conversion in both directions and is designed with a focus on ease of use, providing immediate feedback and error handling.

### Key Features:
- **Automatic Conversion**: As soon as you paste or type content in the JSON or YAML text area, the corresponding format is generated automatically.
- **Bi-directional Conversion**: Supports conversion from JSON to YAML and vice versa.
- **Copy to Clipboard**: Includes copy buttons for each format, allowing you to easily copy the generated JSON or YAML.
- **Prettify JSON**: Formats and beautifies the JSON content for easier readability.
- **Dark Mode**: Includes a dark mode that can be toggled on and off for a better user experience.
- **Responsive Design**: Works well on both desktop and mobile devices.

## Live Demo

You can access the live version of the tool at: [Your Live Demo URL]

## Screenshots

![JSON to YAML Converter](screenshot.png)

## Table of Contents

1. [Features](#features)
2. [Installation](#installation)
3. [Usage](#usage)
4. [SEO Optimization](#seo-optimization)
5. [Contributing](#contributing)
6. [License](#license)

---

## Features

- **Automatic Conversion**: Just paste or type JSON or YAML into the respective text areas, and the other format will be generated automatically.
- **Error Handling**: The app will show errors in the console when the provided JSON or YAML is invalid, helping you debug your input.
- **Copy Buttons**: Easily copy JSON or YAML to the clipboard using the provided buttons.
- **Prettify JSON**: Beautify your JSON with proper indentation for better readability.
- **Dark Mode**: A toggle button allows users to switch between light and dark modes.
- **Responsive Design**: The application is fully responsive, working smoothly on both mobile and desktop devices.

---

## Installation

### 1. Clone the Repository

To get a local copy of the project, run the following command in your terminal:

\`\`\`bash
git clone https://github.com/your-username/json-yaml-converter.git
\`\`\`

### 2. Navigate to the Project Directory

\`\`\`bash
cd json-yaml-converter
\`\`\`

### 3. Open \`index.html\`

Simply open the \`index.html\` file in your browser to use the application locally.

\`\`\`bash
open index.html
\`\`\`

---

## Usage

### Convert JSON to YAML

1. Paste or type your JSON content into the **JSON** text area.
2. The **YAML** format will automatically be generated in the **YAML** text area.

### Convert YAML to JSON

1. Paste or type your YAML content into the **YAML** text area.
2. The **JSON** format will automatically be generated in the **JSON** text area.

### Copy the Output

- Use the **Copy** buttons next to each text area to copy the content (either JSON or YAML) directly to your clipboard.

### Prettify JSON

- If your JSON input is unformatted, you can click the **Prettify JSON** button to automatically format it for better readability.

### Toggle Dark Mode

- Click the toggle button at the top-right corner to switch between light and dark modes.

---

## SEO Optimization

To improve the SEO for your application, the following techniques have been applied:

1. **Title and Meta Tags**:
- The app uses a descriptive title and meta tags for better search engine visibility.
\`\`\`html
JSON to YAML and YAML to JSON Converter


\`\`\`

2. **Structured Data (JSON-LD)**:
- Schema.org structured data has been added to describe the application.
\`\`\`html

{
"@context": "https://schema.org",
"@type": "WebApplication",
"name": "JSON to YAML Converter",
"description": "An online tool to convert JSON to YAML and YAML to JSON.",
"url": "https://yourwebsite.com",
"applicationCategory": "Utility",
"operatingSystem": "All",
"author": {
"@type": "Person",
"name": "Your Name"
}
}

\`\`\`

3. **Responsive Design**:
- The app is fully responsive and optimized for mobile devices, which is a key ranking factor for SEO.

4. **Sitemap and Robots.txt**:
- A sitemap and robots.txt have been included to guide search engine crawlers.

---

## Contributing

We welcome contributions to improve this project! Please follow these steps to contribute:

1. **Fork the Project**: Click the "Fork" button on the top-right of this page and fork it to your own account.
2. **Create a New Branch**: Create a new feature or bug-fix branch.
\`\`\`bash
git checkout -b feature/new-feature
\`\`\`
3. **Commit Your Changes**: After making your changes, commit them with a detailed message.
\`\`\`bash
git commit -m "Add new feature"
\`\`\`
4. **Push Your Branch**: Push the changes to your forked repository.
\`\`\`bash
git push origin feature/new-feature
\`\`\`
5. **Submit a Pull Request**: Create a new pull request to merge your changes into the main repository.

---

## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

---

## Contact

If you have any questions or suggestions, feel free to contact me at:

- **Email**: bhanu011@gmail.com
- **GitHub**: [bhanurp](https://github.com/bhanurp)