当我尝试从页面上的表中返回记录时,它会将所有内容作为原始数据吐出一行,使其变得丑陋且难以理解。
如何让它将格式正确的记录作为JSON返回?
修改
打印出来:
{"id":4,"title":"My Second New Card","created_at":"2016-09-05 12:06:32","updated_at":"2016-09-05 12:06:32"}
我希望它像这样打印出来:
{
"id": 4,
"title": "My Second New Card",
"created_at": "2016-09-05 12:06:32",
"updated_at": "2016-09-05 12:06:32"
}