载入中...
搜索中...
未找到
McpSceneLiteral.hpp
浏览该文件的文档.
19[[nodiscard]] inline Result<std::string> sceneLiteral(const Poco::Dynamic::Var& value, int depth = 0) {
22 DiagnosticCode::InvalidArgument, "Scene parameters require finite JSON values with depth at most 16",
27 if (value.isBoolean()) return Result<std::string>::success(value.convert<bool>() ? "true" : "false");
28 if (value.isInteger()) return Result<std::string>::success(std::to_string(value.convert<Poco::Int64>()));
Move-only, checked operation results for the common layer.
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.cpp:21
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:196
Definition ActionGuideExport.cpp:13
std::string mcpJsonEscape(const std::string &value)
Escape a raw string for embedding inside a JSON string literal.
Definition McpJson.hpp:31
Result< std::string > sceneLiteral(const Poco::Dynamic::Var &value, int depth=0)
Encode owning JSON data as a Squirrel literal without losing pointer containers or precision.
Definition McpSceneLiteral.hpp:19
@ InvalidArgument