We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DataFrame
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of Polars.
As the title indicates. If the json string exists \n and Chinese characters. DataFrame create result will be garbled code
\n
Chinese characters
use serde_json::json; use std::io::Cursor; use polars::prelude::*; fn main() { let json_data = json!([{ "id": 8, "name": "小P", "exception": "你好,polars。\n", "normal": "你好,polars。", "姓\n名": "小P", }]); let json_data_str = json_data.to_string(); let json_cursor = Cursor::new(json_data_str); let df = JsonReader::new(json_cursor).finish().unwrap(); println!("{:?}", df); }
shape: (1, 5) ┌─────────────────┬─────┬──────┬────────────────┬────────────┐ │ exception ┆ id ┆ name ┆ normal ┆ å§ │ │ --- ┆ --- ┆ --- ┆ --- ┆ å │ │ str ┆ i64 ┆ str ┆ str ┆ --- │ │ ┆ ┆ ┆ ┆ str │ ╞═════════════════╪═════╪══════╪════════════════╪════════════╡ │ ä½ å¥½ï¼polarsã ┆ 8 ┆ 小P ┆ 你好,polars。 ┆ 小P │ │ ┆ ┆ ┆ ┆ │ └─────────────────┴─────┴──────┴────────────────┴────────────┘
Expect the result be normal.
The text was updated successfully, but these errors were encountered:
this seems to be a bug in the upstream parser. I opened up an issue in that repo with a minimum example jorgecarleitao/json-deserializer#22
Sorry, something went wrong.
When can it be released? is any plan?
Successfully merging a pull request may close this issue.
Polars version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of Polars.
Issue description
As the title indicates. If the json string exists
\n
andChinese characters
. DataFrame create result will be garbled codeReproducible example
Run result
Expected behavior
Expect the result be normal.
Installed versions
serde_json = "1.0.68"
polars = { version = "0.28.0", features = ["json", "lazy", "serde"] }
polars-sql = "0.28.0"
The text was updated successfully, but these errors were encountered: