Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JSONMarshalFunc ¶
func JSONMarshalFunc() celexp.ExtFunction
JSONMarshalFunc returns a CEL function that marshals a value to a JSON string. The function takes any value and returns a compact JSON string representation.
Example usage:
json.marshal({"name": "John", "age": 30}) // Returns: '{"name":"John","age":30}'
func JSONMarshalPrettyFunc ¶
func JSONMarshalPrettyFunc() celexp.ExtFunction
JSONMarshalPrettyFunc returns a CEL function that marshals a value to a pretty-printed JSON string. The function takes any value and returns an indented JSON string representation.
Example usage:
json.marshalPretty({"name": "John", "age": 30})
func JSONUnmarshalFunc ¶
func JSONUnmarshalFunc() celexp.ExtFunction
JSONUnmarshalFunc returns a CEL function that unmarshals a JSON string to a value. The function takes a JSON string and returns the parsed value (map, list, string, number, bool, or null).
Example usage:
json.unmarshal('{"name":"John","age":30}') // Returns: {"name": "John", "age": 30}
func YamlMarshalFunc ¶
func YamlMarshalFunc() celexp.ExtFunction
YamlMarshalFunc returns a CEL function that marshals a value to a YAML string. The function takes any value and returns a YAML string representation.
Example usage:
yaml.marshal({"name": "John", "age": 30})
func YamlUnmarshalFunc ¶
func YamlUnmarshalFunc() celexp.ExtFunction
YamlUnmarshalFunc returns a CEL function that unmarshals a YAML string to a value. The function takes a YAML string and returns the parsed value (map, list, string, number, bool, or null).
Example usage:
yaml.unmarshal('name: John\nage: 30') // Returns: {"name": "John", "age": 30}
Types ¶
This section is empty.