MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / stringify

Function stringify

src/framework/io/json.cpp:310–323  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

308 const double value = as_number();
309 if (!std::isfinite(value) || std::floor(value) != value) {
310 throw std::runtime_error("json number is not an integer");
311 }
312 return static_cast<int64_t>(value);
313}
314
315float Value::as_f32() const {
316 return static_cast<float>(as_number());
317}
318
319const std::string & Value::as_string() const {
320 if (!is_string()) {
321 throw std::runtime_error("json value is not a string");
322 }
323 return string_value_;
324}
325
326const Value::Array & Value::as_array() const {

Callers 15

stringify_numberFunction · 0.85
stringify_stringFunction · 0.85
json_option_stringFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
option_textFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85

Calls 3

make_cjsonFunction · 0.85
print_cjsonFunction · 0.85
cJSON_DeleteFunction · 0.85

Tested by

no test coverage detected