MCPcopy Create free account
hub / github.com/ByConity/ByConity / toInt

Method toInt

base/common/JSON.cpp:705–715  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

703}
704
705Int64 JSON::toInt() const
706{
707 ElementType type = getType();
708
709 if (type == TYPE_NUMBER)
710 return getInt();
711 else if (type == TYPE_STRING)
712 return JSON(ptr_begin + 1, ptr_end, level + 1).getInt();
713 else
714 throw JSONException("JSON: cannot convert value to signed integer.");
715}
716
717UInt64 JSON::toUInt() const
718{

Callers

nothing calls this directly

Calls 2

JSONClass · 0.85
getIntMethod · 0.45

Tested by

no test coverage detected