阅读完JSON内容后遇到的其他文本: [英] Additional text encountered after finished reading JSON content:
本文介绍了阅读完JSON内容后遇到的其他文本:的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在使用JSON.Net创建时遇到一些问题.当我尝试解析它时,它给了我以下错误:
I am having some problems with create with JSON.Net. When I try to parse it, it gives me following error:
阅读完JSON内容后遇到的其他文本:
Additional text encountered after finished reading JSON content:
我尝试使用 http://json.parser.online.fr/进行验证说"SyntaxError:意外令牌".
I tried validating it with http://json.parser.online.fr/ and it says "SyntaxError: Unexpected token ,".
我的JSON如下:
{"StaffID":"S01","StaffRank":"Manager"},{"StaffID":"S02","StaffRank":"Waiter"}
如何反序列化?
推荐答案
您需要用方括号将其括起来,这表示它是一个数组:
You need to surround that with square brackets, which denotes that it's an array:
[{"StaffID":"S01","StaffRank":"Manager"},{"StaffID":"S02","StaffRank":"Waiter"}]
这篇关于阅读完JSON内容后遇到的其他文本:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文