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

JBArgument Parse error #25

Open
cleven1 opened this issue Sep 17, 2019 · 9 comments
Open

JBArgument Parse error #25

cleven1 opened this issue Sep 17, 2019 · 9 comments

Comments

@cleven1
Copy link

cleven1 commented Sep 17, 2019

一直报JBArgument Parse error

jsBridge.networkInfo({
success:function(e){
Dialog({
title: "成功",
content: e
});
},
fail:function(e){
Dialog({
title: "成功",
content: e
});
}
})
js端就这样调用,偶发性会报Parse error

@pengwei1024
Copy link
Owner

这个原因是解析传递的json出问题。你们把自己的内容encode 一下再传递?应该可以解决这个问题

@cleven1
Copy link
Author

cleven1 commented Sep 17, 2019

在安卓端有没有办法解决??

@pengwei1024
Copy link
Owner

3cd272e295eb4ce7e9f92fdfa

你可以打印这个参数出来看看,为什么会解析json失败。多半的情况应该是数据里面包含了单双引号导致的,我后续处理下

@cleven1
Copy link
Author

cleven1 commented Sep 17, 2019

好的 辛苦大佬了 等你更新

@pengwei1024
Copy link
Owner

我还是不能100%确定什么原因导致的呀,你这个是偶现?你最好给我抓一份传递的参数我来分析一下

@cleven1
Copy link
Author

cleven1 commented Sep 18, 2019

大佬可以加个联系方式吗? QQ:543069316

@cleven1
Copy link
Author

cleven1 commented Sep 19, 2019

image
大佬 这种方式的我应该怎么接收?

@pengwei1024
Copy link
Owner

image
大佬 这种方式的我应该怎么接收?

新增方法参数是 String 和 JBCallback 就好呀

@cleven1
Copy link
Author

cleven1 commented Sep 29, 2019

我在执行callback.apply方法的时候传的是JsonObject 但是JS拿到的数据格式是String 这是什么原因??

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