MCPcopy Create free account
hub / github.com/PlayFab/gsdk / asString

Method asString

cpp/cppsdk/jsoncpp.cpp:3120–3144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3118}
3119
3120JSONCPP_STRING Value::asString() const {
3121 switch (type_) {
3122 case nullValue:
3123 return "";
3124 case stringValue: {
3125 if (value_.string_ == 0)
3126 return "";
3127 unsigned this_len;
3128 char const* this_str;
3129 decodePrefixedString(this->allocated_, this->value_.string_, &this_len,
3130 &this_str);
3131 return JSONCPP_STRING(this_str, this_len);
3132 }
3133 case booleanValue:
3134 return value_.bool_ ? "true" : "false";
3135 case intValue:
3136 return valueToString(value_.int_);
3137 case uintValue:
3138 return valueToString(value_.uint_);
3139 case realValue:
3140 return valueToString(value_.real_);
3141 default:
3142 JSON_FAIL_MESSAGE("Type is not convertible to string");
3143 }
3144}
3145
3146#ifdef JSON_USE_CPPTL
3147CppTL::ConstString Value::asConstString() const {

Callers 15

JsonFileConfigurationMethod · 0.80
readObjectMethod · 0.80
newStreamWriterMethod · 0.80
FromJsonMethod · 0.80
GenerateReportMethod · 0.80
CurlReceiveDataMethod · 0.80
FromJsonUtilTFunction · 0.80
FromJsonUtilSFunction · 0.80
FromJsonUtilOFunction · 0.80
FromJsonUtilPFunction · 0.80
FromJsonEnumFunction · 0.80

Calls 2

decodePrefixedStringFunction · 0.85
valueToStringFunction · 0.85

Tested by

no test coverage detected