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:
Daniel Patterson
2018-09-01 22:22:37 -07:00
parent 4cbc439e03
commit 46e89716aa
9 changed files with 301 additions and 20 deletions
+13
View File
@@ -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.
*