1#ifndef TENDUKE_JSON_SIMPLEJSONNUMBER_H
2#define TENDUKE_JSON_SIMPLEJSONNUMBER_H
4#include "./SimpleJSONElement.h"
5#include "json/JSONNumber.h"
14 explicit SimpleJSONNumber(
double value)
15 : SimpleJSONElement(::tenduke::json::JSONElement::NUMBER),
27 if (std::trunc(this->value) == this->value) {
28 return std::to_string(
static_cast<std::int64_t
>(this->value));
30 return std::to_string(this->value);
Represents JSON number.
Definition JSONNumber.h:12
Definition SimpleJSONElement.h:11
std::string asJSON() const override
Serializes the element as JSON.
Definition SimpleJSONNumber.h:25
double getValue() const override
Returns the value.
Definition SimpleJSONNumber.h:20
JSON support.
Definition JSONArray.h:10
Root for classes, functions and globals of 10Duke C++ Client.
Definition APIRequest.h:4