volder
volder copied to clipboard
JSON function: is new volder type
JSON function is a new idea for validating json data, if it correct return true otherwise return false
input is user enterd value.
const JSON = (input) => {
// validate and return
}
const isJSONdata = singlVolder({ type:JSON })
Hi. I'm interested in contributing to volder. And I think this is a good first issue for me. How about this solution for json function:
export const Json = (input) => {
try {
JSON.parse(input);
} catch (e) {
return false;
}
return true;
};
@hariswb
thank you for contributing. this is good first solution and it's need a proper test, if you can. you can make a fork and create a pull request and I hopefuly accept your changes. have fun.
great. i'll try figuring out the test