MCPcopy Create free account
hub / github.com/cel-expr/cel-go / JSONEncode

Function JSONEncode

ext/encoders.go:335–337  ·  view source on GitHub ↗

JSONEncode encodes a CEL ref.Val to its JSON string representation.

(val ref.Val)

Source from the content-addressed store, hash-verified

333
334// JSONEncode encodes a CEL ref.Val to its JSON string representation.
335func JSONEncode(val ref.Val) (string, error) {
336 return jsonEncodeValue(val)
337}
338
339// JSONParse parses a JSON string into a dynamic CEL ref.Val using the given type adapter.
340// If adapter is nil, types.DefaultTypeAdapter is used.

Callers 1

TestPublicAPIFunction · 0.85

Calls 1

jsonEncodeValueFunction · 0.85

Tested by 1

TestPublicAPIFunction · 0.68