MCPcopy Create free account
hub / github.com/aws-cloudformation/rain / ToSJson

Function ToSJson

internal/node/node.go:162–171  ·  view source on GitHub ↗

Convert a node to a shortened JSON for easier debugging

(node *yaml.Node)

Source from the content-addressed store, hash-verified

160
161// Convert a node to a shortened JSON for easier debugging
162func ToSJson(node *yaml.Node) string {
163 if node == nil {
164 return "nil"
165 }
166 j, err := json.MarshalIndent(makeSNode(node), "", " ")
167 if err != nil {
168 return fmt.Sprintf("Failed to marshal node to short json: %v:", err)
169 }
170 return string(j)
171}
172
173// Convert a node to JSON
174func ToJson(node *yaml.Node) string {

Callers 15

ParseModuleConfigMethod · 0.92
getMapKeysFunction · 0.92
moduleFunction · 0.92
OutputGetAttMethod · 0.92
includeS3ObjectFunction · 0.92
writeParameterFunction · 0.92
GetMapValueFunction · 0.92
matchPathFunction · 0.92
processMetadataFunction · 0.92
merge.goFile · 0.92
mergeOutputImportsFunction · 0.92

Calls 1

makeSNodeFunction · 0.85

Tested by 5

TestResolveRefParamFunction · 0.74
TestResolveRefResourceFunction · 0.74
TestResolveGetAttFunction · 0.74
TestResolveSubFunction · 0.74
TestResolveSequenceFunction · 0.74