The placeholder (container) class represents the Boolean value
class boolean_t
-
Set the bool value to the placeholder.
boolean_t(bool v)
Params:
v
- The bool value to set.
-
Return the pointer to internal string buffer.
const char * c_str() const
Returns:
const char *
- The pointer to internal string buffer.
-
Prints data to the serial port as human-readable ASCII text.
size_t printTo(Print &p)
Params:
p
- The Print object.
Returns:
size_t
- The length of string that printed.
The placeholder (container) class represents the number value
class number_t
-
Set the number types T value to the placeholder.
number_t(TV v, int d)
Params:
v
- The number types T value to set.d
- The deceimal places of float and double value to set.
-
Set the number and object type T value to the placeholder. The constructor does not gauard for non-number value.
number_t(T o)
Params:
o
- The number type T value to set.
-
Return the pointer to internal string buffer.
const char * c_str() const
Returns:
const char *
- The pointer to internal string buffer.
-
Prints data to the serial port as human-readable ASCII text.
size_t printTo(Print &p)
Params:
p
- The Print object.
Returns:
size_t
- The length of string that printed.
The placeholder (container) class represents the string value
class string_t
-
Set the primitive and object types T value to the placeholder. This supports number_t and boolean_t objects.
string_t(T v)
Params:
v
- The primitive and object types T value to set.
-
Append the value to the placeholder.
string_t &operator+=(const T &rval)
Params:
v
- The primitive and object types T value to append.
Returns:
string_t &
- The self instance.
-
Return the pointer to internal string buffer.
const char * c_str() const
Returns:
const char *
- The pointer to internal string buffer.
-
Prints data to the serial port as human-readable ASCII text.
size_t printTo(Print &p)
Params:
p
- The Print object.
Returns:
size_t
- The length of string that printed.
-
Clear internal buffer.
void clear()
The placeholder (container) class represents the JSON value
class object_t
-
Set the primitive and object types T value to the placeholder. This supports number_t, boolean_t and string_t objects.
object_t(T v)
Params:
v
- The primitive and object types T value to set.
-
Append the value to the placeholder.
string_t &operator+=(const T &rval)
Params:
v
- The primitive and object types T value to append.
Returns:
object_t &
- The self instance.
-
Initiate the placeholder as JSON object representation.
void initObject()
-
Initiate the placeholder as JSON Array object representation.
void initArray()
-
Return the pointer to internal string buffer.
const char * c_str() const
Returns:
const char *
- The pointer to internal string buffer.
-
Prints data to the serial port as human-readable ASCII text.
size_t printTo(Print &p)
Params:
p
- The Print object.
Returns:
size_t
- The length of string that printed.
-
Clear internal buffer.
void clear()