Make isGoodSyntax return json with structure or error message