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

Function jsonValue

pdal/Metadata.hpp:594–613  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

592 }
593
594 std::string jsonValue() const
595 {
596 if (m_impl->m_type == "json")
597 return value();
598
599 std::string v(Utils::escapeJSON(value()));
600 if (m_impl->m_type == "double")
601 if (v == "NaN" || v == "Infinity" || v == "-Infinity")
602 v = "\"" + v + "\"";
603 if (m_impl->m_type == "string" || m_impl->m_type == "base64Binary" ||
604 m_impl->m_type == "uuid" || m_impl->m_type == "matrix" ||
605 m_impl->m_type == "spatialreference" || m_impl->m_type == "bounds")
606 {
607 std::string val("\"");
608 val += escapeQuotes(v) + "\"";
609 return val;
610 }
611
612 return v;
613 }
614
615 std::string description() const
616 { return m_impl->m_descrip; }

Callers 2

extractSRSFunction · 0.50
icSelfPathFunction · 0.50

Calls 2

valueFunction · 0.85
escapeQuotesFunction · 0.85

Tested by

no test coverage detected