MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / asString

Method asString

json/jsoncpp.cpp:3123–3147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 3

InspireWriteCallbackFunction · 0.80
readObjectMethod · 0.80
newStreamWriterMethod · 0.80

Calls 2

decodePrefixedStringFunction · 0.85
valueToStringFunction · 0.85

Tested by

no test coverage detected