I got a simple JSON that could benefit from some regex testing
{
"Name": "Ingemar Stenmark",
"personalNumber": "197304211770",
"id": "069234f2-771c-415a-aa5a-3ca77c74f832"
}
It would be formatted like that exempt no line breaks ({"Name": "Ingemar Stenmark", "personalNumber": "197304211770", "id": "069234f2-771c-415a-aa5a-3ca77c74f832"})
Is there any way it could be tested in js using regex?
JSON.stringify()then why validate it? Also, when exactly would it fail validation, and when wouid it succeed?