| 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; } |
no test coverage detected