MCPcopy Create free account
hub / github.com/cinder/Cinder / asString

Method asString

src/jsoncpp/jsoncpp.cpp:2021–2038  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2019}
2020
2021std::string Value::asString() const {
2022 switch (type_) {
2023 case nullValue:
2024 return "";
2025 case stringValue:
2026 return value_.string_ ? value_.string_ : "";
2027 case booleanValue:
2028 return value_.bool_ ? "true" : "false";
2029 case intValue:
2030 return valueToString(value_.int_);
2031 case uintValue:
2032 return valueToString(value_.uint_);
2033 case realValue:
2034 return valueToString(value_.real_);
2035 default:
2036 JSON_FAIL_MESSAGE("Type is not convertible to string");
2037 }
2038}
2039
2040#ifdef JSON_USE_CPPTL
2041CppTL::ConstString Value::asConstString() const {

Callers 2

readObjectMethod · 0.80
initMethod · 0.80

Calls 1

valueToStringFunction · 0.85

Tested by

no test coverage detected