Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
出于好奇,为什么 Simple-JSON 解析器不返回 JSONObject?
在检查了代码之后,我突然想到:JSONParser 和许多解析器一样,是一个递归函数,它在构建树节点和子树之后返回它们。在解析期间,返回值可以是 JSON 字符串、数字、数组或对象,因此必须使用最广泛的基本类型(对象)作为返回类型。