code: def test_write_json_categoricals() -> None:
      data = {"column": ["test1", "test2", "test3", "test4"]}
      df = pl.DataFrame(data).with_columns(
          pl.col("column").cast(pl.Categorical)
      )
  
      assert (
          df.write_json(row_oriented=True, file=None)
          == '[{"column":"test1"},{"column":"test2"},{"column":"test3"},{"column":"test4"}]'
      )
  
imports: from __future__ import annotations
  import datetime
  import io
  import json
  from collections import OrderedDict
  from io import BytesIO
  from typing import TYPE_CHECKING, Any
  import pytest
  import polars
  from polars.testing import assert_frame_equal
label_desc: Use image node_id 13 for calling a global function with example usage: test_write_json_categoricals() without return types