Function get_number_value

Synopsis

#include <include/sajson.h>

double get_number_value() const

Description

Returns a numeric value as a double-precision float. Only legal if get_type() is TYPE_INTEGER or TYPE_DOUBLE.

Mentioned in

Source

Lines 601-608 in include/sajson.h.

double get_number_value() const {
    assert_tag_2(tag::integer, tag::double_);
    if (value_tag == tag::integer) {
        return get_integer_value();
    } else {
        return get_double_value();
    }
}





Add Discussion as Guest

Log in