在JAVA中查找JSON字符串深度的数组
java方法中给了我一个字符串,我必须返回该字符串的子深度
比如如果方法是
find depthJSON(String s){
//code
return count;
}
例如:
{
"0" : { "name" : "John", "City" : "NY"},
"1" : { "name" : "Mike", "City" : "LA"}
}
对于该输入,深度为2
你可以在下面搜索框中键入要查询的问题!
java方法中给了我一个字符串,我必须返回该字符串的子深度
比如如果方法是
find depthJSON(String s){
//code
return count;
}
例如:
{
"0" : { "name" : "John", "City" : "NY"},
"1" : { "name" : "Mike", "City" : "LA"}
}
对于该输入,深度为2
# 1 楼答案
我的答案是