it-tools icon indicating copy to clipboard operation
it-tools copied to clipboard

add json repair

Open guilinonline opened this issue 1 month ago • 4 comments

What type of request is this?

New tool idea

Clear and concise description of the feature you are proposing

FYI, json repair!!!

const { jsonrepair } = require('jsonrepair');
const broken = '{ name: "Bob", age: 42, }';
const fixed = jsonrepair(broken);
console.log(fixed); // Now valid JSON!
``` :contentReference[oaicite:2]{index=2}

Is there example of this tool in the wild?

No response

Additional context

No response

Validations

  • [x] Check the feature is not already implemented in the project.
  • [x] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
  • [x] Check that the feature can be implemented in a client side only app (IT-Tools is client side only, no server).

guilinonline avatar Dec 01 '25 08:12 guilinonline

Hi @guilinonline there is currently: https://sharevb-it-tools.vercel.app/json-prettify and https://sharevb-it-tools.vercel.app/json-linter

But could be interesting to allow to find these tool on "repair" search and add repair option to linter

sharevb avatar Dec 02 '25 07:12 sharevb

Oh damn, that’s awesome! Now this is getting interesting. I’m gonna purposely upload a wrong one just to test it out!

guilinonline avatar Dec 02 '25 07:12 guilinonline

If the error is too serious, it can’t fix it — like when a VALUE is missing.

guilinonline avatar Dec 02 '25 07:12 guilinonline

What type of request is this?

New tool idea

Clear and concise description of the feature you are proposing

FYI, json repair!!!

const { jsonrepair } = require('jsonrepair');
const broken = '{ name: "Bob", age: 42, }';
const fixed = jsonrepair(broken);
console.log(fixed); // Now valid JSON!
``` :contentReference[oaicite:2]{index=2}

Is there example of this tool in the wild?

No response

Additional context

No response

Validations

  • [x] Check the feature is not already implemented in the project.[x] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.[x] Check that the feature can be implemented in a client side only app (IT-Tools is client side only, no server).

This jsonrepair library is pretty powerful — it can even fix some ridiculously messed-up JSON. You should give it a try.

guilinonline avatar Dec 02 '25 08:12 guilinonline

I am also very interested in this! I literally just found out about this awesome fork, and you literally created an issue yesterday for json repair 😄

I am using a tool called DevUtils (https://devutils.com/) on my Mac, which is a offline native app that allows to do most things it-tools does. It also supports viewing JSON, and if you enter broken json, it will automatically repair it, like this:

Image

so I think if it-tools could also repair JSON automatically, that would be really really dope! 😄 I'm trying to get away from devutils to something open-source, so I would be really happy!

Myzel394 avatar Dec 02 '25 16:12 Myzel394