I'm trying to convert a Polars dataframe to a JSON object, but I can't seem to find a way to change the format of it between row/col orientation. In Pandas, by default, it creates a column-oriented JSON object, and it can be changed easily, but in Polars it's row-oriented and I can't seem to find a way to change that, since the write_json method doesn't actually receives any argument other than the target filename if you want to save it directly.
Any idea how to achieve that?