本文介绍了在我的json中完成读取JSON内容和意外令牌后遇到的其他文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I am having some problems with my json-feed created with JSON.Net. When I try to parse it, it gives me

我尝试使用 http://json.parser.online.fr/对其进行验证说"SyntaxError:意外令牌".

I tried validating it with http://json.parser.online.fr/ and it says "SyntaxError: Unexpected token ,".

有什么想法吗?

我在下面粘贴了我的json:

I have pasted my json below:

{
    "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.之后,,是意外的令牌.在那之后,{ ... }是尾随垃圾.

{ ... } is valid JSON. After that, , is an unexpected token. After that, { ... } is trailing garbage.

这篇关于在我的json中完成读取JSON内容和意外令牌后遇到的其他文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-03 14:18