class_docstr: Namespace for struct related expressions.
docstr: Convert this struct to a string column with json values.
  
  Examples
  --------
  >>> pl.DataFrame(
  ...     {"a": [{"a": [1, 2], "b": [45]}, {"a": [9, 1, 3], "b": None}]}
  ... ).with_columns(pl.col("a").struct.json_encode().alias("encoded"))
  shape: (2, 2)
  ┌──────────────────┬────────────────────────┐
  │ a                ┆ encoded                │
  │ ---              ┆ ---                    │
  │ struct[2]        ┆ str                    │
  ╞══════════════════╪════════════════════════╡
  │ {[1, 2],[45]}    ┆ {"a":[1,2],"b":[45]}   │
  │ {[9, 1, 3],null} ┆ {"a":[9,1,3],"b":null} │
  └──────────────────┴────────────────────────┘
code: def json_encode(self) -> Expr:
      """
      Convert this struct to a string column with json values.
  
      Examples
      --------
      >>> pl.DataFrame(
      ...     {"a": [{"a": [1, 2], "b": [45]}, {"a": [9, 1, 3], "b": None}]}
      ... ).with_columns(pl.col("a").struct.json_encode().alias("encoded"))
      shape: (2, 2)
      ┌──────────────────┬────────────────────────┐
      │ a                ┆ encoded                │
      │ ---              ┆ ---                    │
      │ struct[2]        ┆ str                    │
      ╞══════════════════╪════════════════════════╡
      │ {[1, 2],[45]}    ┆ {"a":[1,2],"b":[45]}   │
      │ {[9, 1, 3],null} ┆ {"a":[9,1,3],"b":null} │
      └──────────────────┴────────────────────────┘
  
      """
      return wrap_expr(self._pyexpr.struct_json_encode())
  
file_path: polars/py-polars/polars/expr/struct.py
imports: from __future__ import annotations
  from typing import TYPE_CHECKING, Sequence
  from polars.utils._wrap import wrap_expr
label_desc: Use image node_id 5 for calling the ExprStructNameSpace obj's underlying member method code with example usage: obj.json_encode() and returns: wrap_expr