在MySQL Workbench问题中保存JSON

发布于 2025-02-13 15:24:52 字数 304 浏览 0 评论 0原文

我有以下字符串:

"test\n\ntest\n\ntest3"

该字符串是我将其插入MySQL Workbench的表中的JSON值的一部分。插入数据后,当我检查表中的数据时,字符串将转换为以下内容:

 "test
 
 test
 
 test3"

然后,这使我的JSON无效。我希望MySQL Workbench只能按照我发送的数据准确保留数据,而不是将“ \ n”转换为表中的新行。

有没有办法告诉MySQL Workbench停止格式化数据?

I have the following string:

"test\n\ntest\n\ntest3"

The string is part of a JSON value that I am inserting into a table in MySQL Workbench. After the data is inserted the string gets converted into the following when I check the data in the table:

 "test
 
 test
 
 test3"

Which then makes my JSON invalid. I want MySQL Workbench to just keep the data exactly as I send it, instead of converting the "\n" into new lines in the table.

Is there some way to tell MySQL Workbench to stop formatting the data?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文