Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug模式下,如果Json串中包含数组或者嵌套的Json,无法显示回调的数据 #13

Open
brandlee opened this issue Jun 29, 2018 · 9 comments

Comments

@brandlee
Copy link

brandlee commented Jun 29, 2018

如题,Debug模式下的时候,Json串的解析好像有点问题,返回的都是{"data":{"empty":false}}

@pengwei1024
Copy link
Owner

我尽快检查下

@pengwei1024
Copy link
Owner

可以再详细点吗?是方法参数里面包含了复杂JSON还是 JBCallback.apply()包含复杂数据呀?

@pengwei1024
Copy link
Owner

@brandlee

@brandlee
Copy link
Author

在Debug模式下,比如这种形式的Json:
"data":[ "one", "two", "three", "four", "five", { "notice":[ "www.sojson.com", "json.la" ] }
这个时候Debug的话,我获取到的JBMap msg返回的结果是{empty:false}这种形式的,但是但我解析到下一步的时候,数据又能够解析出来,挺诡异的现象

@pengwei1024
Copy link
Owner

数组里面包含对象吗?其实不建议这种数据结构。解析应该是没问题的。你说的解析到下一步指的什么啊?

@brandlee
Copy link
Author

另外提一个建议哈,如果不提前判断haskey,直接根据key值获取value,就会导致crash,这就像Json的getString和optString的区别一样,建议用optString的方式是不是会好一点?

@brandlee
Copy link
Author

就是断点到下一步的时候,数据又被解析出来了

@pengwei1024
Copy link
Owner

数据解析这里我周末梳理优化下。数据解析也是在主线程做的,可能被阻塞了。直接运行数据是正常的吗?

@brandlee
Copy link
Author

嗯呢,谢了哈!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants