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

please help me add TypeAdapter<Map<String,String>> #14

Open
s949492225 opened this issue Oct 13, 2021 · 1 comment
Open

please help me add TypeAdapter<Map<String,String>> #14

s949492225 opened this issue Oct 13, 2021 · 1 comment

Comments

@s949492225
Copy link

我的写法是
MapTypeAdapter是这个TypeAdapter<Map<String,String>>

.registerTypeAdapter(
object : TypeToken<Map<String, String>>() {}.type,
MapTypeAdapter()
)

但是泛型识别不出来,实现不知道这个type要怎么传递

@seven332
Copy link
Owner

seven332 commented Nov 6, 2021

  • 修改了下 TypeAdapter 的接口,现在传的是 JSContext
  • JSContext.evaluate 支持传 Type
  • 添加 JavaType,类似 Gson 的 TypeToken

现在可以支持 TypeAdapter<Map<String,String>> 了
20a0038

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