MCPcopy Create free account
hub / github.com/cvmfs/cvmfs / Format

Method Format

cvmfs/json_document_write.h:80–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78 , float_val(0.0) { }
79
80 std::string Format() const {
81 switch (variant) {
82 case kString:
83 return "\"" + key_escaped + "\":\"" + str_val_escaped + "\"";
84 case kInteger:
85 return "\"" + key_escaped + "\":" + StringifyInt(int_val);
86 case kFloat:
87 return "\"" + key_escaped + "\":" + StringifyDouble(float_val);
88 case kJsonObject:
89 return "\"" + key_escaped + "\":" + str_val_escaped;
90 default:
91 PANIC(kLogStdout | kLogStderr, "JSON creation failed");
92 }
93 }
94 };
95
96 public:

Callers 8

GenerateStringMethod · 0.80
NotifyMethod · 0.80
SaveRepoMetadataMethod · 0.80
InsertPathsMethod · 0.80
ExecSIFFunction · 0.80
ExecDuccFunction · 0.80
CreateLeaseMethod · 0.80
WithTagFunction · 0.80

Calls 2

StringifyIntFunction · 0.85
StringifyDoubleFunction · 0.85

Tested by

no test coverage detected