Is there any plugin or anything on bubble like jsonlint, where i can input my json and it can validate my output
Hey @chintan.rout
Welcome to the Bubble Community!
The first thing I thought of was to use AI. You can connect with OpenAI and can have it verify it for you. I use it for validating JSON all the time. There might be a plugin or a different API that might do that too. This was just the first idea that came to my mind.
1 Like
Also… ChatGPT said this:
One common method is to use the built-in JSON.parse()
method, which will throw an error if the JSON is not valid.
const jsonStr = '{"name":"John","age":30,"city":"New York"}';
try {
const obj = JSON.parse(jsonStr);
console.log(obj);
} catch (e) {
console.error('Invalid JSON:', e.message);
}
You might be able to use one of the plugins to do the same thing, if they return an error, then it’s not valid JSON.