Unexpected character (i) at position 0. - JSON Parsing with Java
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: { "0" : { "upc" : "00000000005", "name" : "Weighable Soup Cups", "location" : "5310ed21d5dc7aaa0343a932" }, "1" : { "upc" : "00000000011", "name" : "OF Reuseable Bags", "location" : "5310ed21d5dc7aaa0343a932" } } Thats a snippet of the JSON I am trying to parse. Here is the code I am using: public class Main { public static void main(String[] args) { JSONParser parser = new JSONParser(); JSONObject jsonObject = null; try { jsonObject = (JSONObject) parser.parse("items.json"); } catch (ParseException e) { e.printStackTrace(); } JSONObject