MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / jsonToNodeParameter

Function jsonToNodeParameter

source/game/StarBehaviorDatabase.cpp:38–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38NodeParameter jsonToNodeParameter(Json const& json) {
39 NodeParameterType type = NodeParameterTypeNames.getLeft(json.getString("type"));
40 if (auto key = json.optString("key"))
41 return {type, *key};
42 else
43 return {type, json.opt("value").value(Json())};
44}
45
46Json nodeOutputToJson(NodeOutput const& output) {
47 return JsonObject {

Callers 1

BehaviorDatabaseMethod · 0.85

Calls 5

JsonClass · 0.85
getStringMethod · 0.80
optStringMethod · 0.80
valueMethod · 0.45
optMethod · 0.45

Tested by

no test coverage detected