Add option to node bindings to return result as a pre-generated JSON string (this avoids a lot of overhead, and moves JSON string rendering out of the main event loop).
This commit is contained in:
@@ -81,6 +81,19 @@ struct String
|
||||
std::string value;
|
||||
};
|
||||
|
||||
/**
|
||||
* Typed string wrapper.
|
||||
*
|
||||
* Unwrap the type via its value member attribute.
|
||||
*/
|
||||
struct Buffer
|
||||
{
|
||||
Buffer() = default;
|
||||
Buffer(const char *value_) : value{value_} {}
|
||||
Buffer(std::string value_) : value{std::move(value_)} {}
|
||||
std::string value;
|
||||
};
|
||||
|
||||
/**
|
||||
* Typed floating point number.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user