MCPcopy Create free account
hub / github.com/cuberite/cuberite / asString

Method asString

lib/jsoncpp/src/lib_json/json_value.cpp:685–707  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

683
684
685std::string
686Value::asString() const
687{
688 switch ( type_ )
689 {
690 case nullValue:
691 return "";
692 case stringValue:
693 return value_.string_ ? value_.string_ : "";
694 case booleanValue:
695 return value_.bool_ ? "true" : "false";
696 case intValue:
697 case uintValue:
698 case realValue:
699 case arrayValue:
700 case objectValue:
701 //JSON_ASSERT_MESSAGE( false, "Type is not convertible to string" );
702 JSON_ASSERT( false );
703 default:
704 JSON_ASSERT_UNREACHABLE;
705 }
706 return ""; // unreachable
707}
708
709# ifdef JSON_USE_CPPTL
710CppTL::ConstString

Callers 5

FromJsonMethod · 0.80
LoadFromDiskMethod · 0.80
LoadFromJsonMethod · 0.80
LoadFromJsonMethod · 0.80
LoadFromJsonMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected