| 929 | } |
| 930 | |
| 931 | inline bool CheckAllowedJSON(const std::string& s) { |
| 932 | unsigned char char_code; |
| 933 | for (auto c : s) { |
| 934 | char_code = static_cast<unsigned char>(c); |
| 935 | if (char_code == 34 // " |
| 936 | || char_code == 44 // , |
| 937 | || char_code == 58 // : |
| 938 | || char_code == 91 // [ |
| 939 | || char_code == 93 // ] |
| 940 | || char_code == 123 // { |
| 941 | || char_code == 125 // } |
| 942 | ) { |
| 943 | return false; |
| 944 | } |
| 945 | } |
| 946 | return true; |
| 947 | } |
| 948 | |
| 949 | } // namespace Common |
| 950 |