| 184 | } |
| 185 | |
| 186 | bool isJSON(const std::string& value) |
| 187 | { |
| 188 | static constexpr std::array<std::pair<char, char>, 3> delims |
| 189 | { { { '{', '}' }, { '[', ']' }, { '"', '"' } } }; |
| 190 | |
| 191 | std::string t = value; |
| 192 | Utils::trim(t); |
| 193 | |
| 194 | if (t.size() < 2) |
| 195 | return false; |
| 196 | for (const std::pair<char, char>& d : delims) |
| 197 | if (t.front() == d.first && t.back() == d.second) |
| 198 | return true; |
| 199 | return false; |
| 200 | } |
| 201 | |
| 202 | std::string tempFilename(const std::string& path) |
| 203 | { |