【问题标题】:Additional text encountered after finished reading JSON content and Unexpected token , in my json在我的 json 中读取完 JSON 内容和 Unexpected token 后遇到的附加文本
【发布时间】:2012-12-08 23:33:12
【问题描述】:

我在使用 JSON.Net 创建的 json-feed 时遇到了一些问题。 当我尝试解析它时,它给了我

阅读完 JSON 内容后遇到的附加文本:,. 路径'',第 17 行,位置 4。

我尝试使用 http://json.parser.online.fr/ 验证它,它显示“SyntaxError: Unexpected token ”。

有什么想法吗?

我在下面粘贴了我的 json:

{
    "ReviewId": 10250,
    "DateOfVisit": "Wed, 04 Jan 2012 00:00:00 +01:00",
    "SmartDateOfVisit": "Wednesday, January 04, 2012 12:00 AM",
    "First": null,
    "IsFeatured": null,
    "Rating": 5,
    "Text": "nice food",
    "ReviewTitle": "superb experience",
    "DisplayName": "mr. X",
    "ProfilePagePath": "http://facebook.com",
    "ProfileImage": "http://facebook.com/images/anonymous.png",
    "UserReviewsWritten": 119,
    "PlaceName": "Some place",
    "PlaceUrl": "http://www.somesite.com/someplace"
  },
{
    "ReviewId": 10250,
    "DateOfVisit": "Wed, 04 Jan 2012 00:00:00 +01:00",
    "SmartDateOfVisit": "Wednesday, January 04, 2012 12:00 AM",
    "First": null,
    "IsFeatured": null,
    "Rating": 5,
    "Text": "nice food",
    "ReviewTitle": "superb experience",
    "DisplayName": "mr. X",
    "ProfilePagePath": "http://facebook.com",
    "ProfileImage": "http://facebook.com/images/anonymous.png",
    "UserReviewsWritten": 119,
    "PlaceName": "Some place",
    "PlaceUrl": "http://www.somesite.com/someplace"
  }

【问题讨论】:

    标签: json json.net


    【解决方案1】:

    { ... } 是有效的 JSON。之后,, 是一个意外的标记。在那之后,{ ... } 是尾随垃圾。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-10-08
      • 2018-07-27
      • 2019-10-18
      • 2016-06-02
      相关资源
      最近更新 更多