Skip to content
New issue

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

Title: How to configure JSON encoding options for JSON columns in Medoo #1131

Open
alexeydovolny opened this issue Dec 11, 2024 · 0 comments

Comments

@alexeydovolny
Copy link

alexeydovolny commented Dec 11, 2024

I'm working with JSON columns in Medoo and facing an issue with Cyrillic characters encoding. When inserting data into a JSON column (using syntax like content[JSON]), Cyrillic characters are being escaped in the database.

Current behavior:

  • JSON data with Cyrillic: {"text":"\u0422\u0435\u0441\u0442"}
  • Expected result: {"text":"Тест"}

Is there a way to configure Medoo to use specific JSON encoding options, particularly:

  • JSON_UNESCAPED_UNICODE
  • JSON_UNESCAPED_SLASHES

Example of my current code:

$database->insert("table_name", ["content[JSON]" => ["text" => "Тест"]]);

Database details:

  • Medoo version: 2.1.12
  • PHP version: 8.3

Any help would be appreciated. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant