// loop result = "base64" for c in string: if c=='{' or c=='[' or c=='\"': result = "json" break else if c=='&': result = "case 2" break