mysql - 如何在 Sequel Pro TEXT 编辑器中创建 JSON 字符串?

标签 mysql json actionscript-3 amfphp sequelpro

我认为这可能是一种创建 JSON 字符串的非常规方式。但是,我真的需要能够像这样在“Sequel Pro”中做到这一点

enter image description here

我希望能够像那样直接编辑它。但是当我在客户端收到字符串,然后尝试在其上使用 as3 JSON.parse 函数时,出现错误..."SyntaxError: Error #1132: Invalid JSON parse input."

 private function storyTextCallBack(r:Object):void
            {

                        //storyText is an 'Object'
                storyText = JSON.parse(r.text);

            }

但这就是我的客户实际得到它的方式,我认为这就是破坏 JSON.parse 函数的原因......

 [\n\t{\n\t\ttext: "hello this is some json test stuff",\n\t\tduration: "5000"\n\t},\n\t{\n\t\ttext: "this is the second line in that json object thing",\n\t\tduration: "3000"\n\t},\n\t{\n\t\ttext: "this is the third and final line in that json object thing",\n\t\tduration: "8000"\n\t}\n]

有人知道我该如何解决这个问题吗?

最佳答案

JSON 中的对象名称需要在引号内:

"text":"example text"

您可以使用此解析器检查您是否拥有有效的 JSON 对象:http://json.parser.online.fr

关于mysql - 如何在 Sequel Pro TEXT 编辑器中创建 JSON 字符串?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14469221/

相关文章:

php - 查询日期中的月、日、年

java - Jackson 使用 JsonTypeInfo.As.WRAPPER_OBJECT 时排除特定类的包装

android - AsyncTask 和 JSON - Android

javascript - 无法在html页面中显示JSON数据

actionscript-3 - Actionscript - 混淆工具或插件或脚本?

Mysql创建触发器抛出错误

mysql - 如何使用 mysql 查询批量编辑 meta_value

java - JPA 将另一个时间保存到数据库中

java - 如何从flex向java套接字服务器发送AMF格式的数据?

actionscript-3 - 共享对象位置