fn render_value(state: &State<'_, '_>, value: &Value) -> String
Expand description

Renders a JSON value into a formatted string according to the provided state.

This function takes a reference to a State instance and a reference to a Value instance. The Value instance represents a JSON value that needs to be rendered. The rendering process considers the state and the structure of the JSON value to generate a formatted string.

Arguments

  • state - A reference to the minijinja::State instance that provides context for rendering.
  • value - A reference to the minijinja::value::Value instance representing the JSON value to be rendered.

Returns

A formatted string representing the rendered output of the provided JSON value.

Notes

This function supports rendering JSON objects, arrays, and strings. Other types of JSON values will result in an empty string in the rendered output.

The rendering process may involve recursive calls when dealing with nested JSON structures.