设置json类型字段,中文可以改成不转码吗
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 25/100
Research direction
Start at vendor/topthink/think-orm/src/db/Builder.php:155 and inspect how JSON field values are encoded. Confirm the requested behavior for Chinese characters and verify whether the existing JSON_UNESCAPED_UNICODE flag already meets it; done means the expected stored JSON representation is produced and covered by an appropriate test.
Written by the indexing model from the issue text.
Description
vendor/topthink/think-orm/src/db/Builder.php:155
154 } elseif (!is_scalar($val) && (in_array($key, (array) $query->getOptions('json')) || 'json' == $query->getFieldType($key))) {
155 $val = json_encode($val,JSON_UNESCAPED_UNICODE);
156 }
- Dominant language
- PHP
- Stars
- 437
- Forks
- 188
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from top-think/think-orm
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
在php7.3及以上版本中,会出错 Open
Difficulty 1/5 Under an hour Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
All issues in top-think/think-orm
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
getgrav/grav-plugin-api#45 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
RSS-Bridge/rss-bridge#5098 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
phingofficial/phing#2025 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
silverstripe/developer-docs#911 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100