Skip to content

kleve-r/json_repair

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSON Repair Flask Service

This service allows you to fix broken JSON strings using the json-repair library wrapped in a Flask microservice.

🔧 Installation

  1. Clone the repository:
    git clone https://github.com/<your-repository>.git
    cd <your-repository>
    
  2. (Optional) Create and activate a virtual environment:
    python3 -m venv venv
    source venv/bin/activate  # or venv\Scripts\activate for Windows
    
  3. Install dependencies:
    pip install -r requirements.txt
    
  4. Copy the .env.example file and name it .env. Add the port if you want to change the default (port 5000):
    cp .env.example .env
    nano .env # here make changes to the variable that is responsible for the application port
    
  5. Launch the application:
    python app.py
    

📦 Dependencies

All dependencies are listed in requirements.txt.

📡 Using APIs

POST request to /repair with body:

{
  "malformedJSON": "invalid JSON"
}

Response:

{
  "status": true,
  "json": { "some": "object" }
}

🧱 Based on

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages