Update isJson() function

Check that string starts with { or [
Also added some more tests