dongxin8709 2015-08-03 14:15
浏览 62

铬网络面板响应选项卡中的未识别红点(json)

I am developing an API using slim framework, when I test this api with postman, phostorms built in tool it works fine and returns valid json. But when I call it from angular it is not getting parsed by angular. It shows unexpected index error.

I tried monitoring the payload in the network tab, surprisingly there are some red bullet mark like dots are appended before the actual json response.

screenshot in response tab

but it is not showing up in the preview tab..

screenshot in preview tab

I don't have a clue where are those dots are coming. I googled about it and find a way about the BOM Problem on windows. But I am not sure how to solve it. Can you please help me to understand the problem and rectify it. Is this a problem caused by code or database or something else.

For information I'm using

  • Operating System : Windows 7,
  • Browser : google chrome,
  • front end MVC : angular (problem only happens here),
  • Backend : Slim Framework (PHP),
  • Database : Mysql ( tables and columns have mixed collations between utf8mb4_bin and latin1_swedish_ci)
  • IDE : PHPStorm 8

EDIT : screenshot from fiddler I used fiddlr to see whats going on and here is the hexview of the responsehewview

  • 写回答

2条回答 默认 最新

  • dqv2743 2015-08-04 09:40
    关注

    Finally I got a workaround to get rid of it but it shouldn't be really used in production. As I am in tight schedule to work on the front end I just use this as a fix.

    I used output buffering ob_start() at the start and cleaned the buffer just before I echo json ob_clean() this removes all the characters from the response. But still can't figure out what is the cause. I am waiting for responses from someone who had the same problem.

    评论

报告相同问题?

悬赏问题

  • ¥15 如何处理复杂数据表格的除法运算
  • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
  • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
  • ¥200 uniapp长期运行卡死问题解决
  • ¥15 请教:如何用postman调用本地虚拟机区块链接上的合约?
  • ¥15 为什么使用javacv转封装rtsp为rtmp时出现如下问题:[h264 @ 000000004faf7500]no frame?
  • ¥15 乘性高斯噪声在深度学习网络中的应用
  • ¥15 关于docker部署flink集成hadoop的yarn,请教个问题 flink启动yarn-session.sh连不上hadoop,这个整了好几天一直不行,求帮忙看一下怎么解决
  • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
  • ¥15 C++ 头文件/宏冲突问题解决