MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / approxJsonSize

Function approxJsonSize

app/src/DataModel/Scripting/ScriptApiCall.cpp:204–207  ·  view source on GitHub ↗

* @brief Returns the UTF-8 byte length of @p obj serialized as compact JSON. */

Source from the content-addressed store, hash-verified

202 * @brief Returns the UTF-8 byte length of @p obj serialized as compact JSON.
203 */
204static int approxJsonSize(const QJsonObject& obj)
205{
206 return QJsonDocument(obj).toJson(QJsonDocument::Compact).size();
207}
208
209/**
210 * @brief Opts the running project into the full MCP command surface for apiCall().

Callers 2

callMethod · 0.85
luaApiCallFunction · 0.85

Calls 2

sizeMethod · 0.45
toJsonMethod · 0.45

Tested by

no test coverage detected