MCPcopy Create free account
hub / github.com/PDAL/PDAL / isJSON

Function isJSON

pdal/PDALUtils.cpp:186–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184}
185
186bool 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
202std::string tempFilename(const std::string& path)
203{

Callers 2

ingestMethod · 0.85
inferTypeMethod · 0.85

Calls 2

trimFunction · 0.85
sizeMethod · 0.45

Tested by 1

ingestMethod · 0.68