-
Notifications
You must be signed in to change notification settings - Fork 495
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
[FEATURE]scala语言项目在编译时报错 #1470
Labels
enhancement
New feature or request
Comments
已经提交pr |
sinodzh
pushed a commit
to sinodzh/fastjson2
that referenced
this issue
May 12, 2023
sinodzh
added a commit
to sinodzh/fastjson2
that referenced
this issue
May 12, 2023
sinodzh
added a commit
to sinodzh/fastjson2
that referenced
this issue
May 13, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
请描述您的需求或者改进建议
当在scala语言的项目中使用fastjson2的时候,如果put的值的类型是非string,会提示如下错误:
error: the result type of an implicit conversion must be more specific than AnyRef
json.put("a",1000/100)
error: the result type of an implicit conversion must be more specific than AnyRef
json.put("b",10)
error: the result type of an implicit conversion must be more specific than AnyRef
json.put("c",10.2d)
请描述你建议的实现方案
在JSONObject中重写put方法,指定输入的值是object
因为JSONObject在类的定义的时候指定了key和value的类型,这样做不影响现有的使用。
描述您考虑过的替代方案
对您考虑过的任何替代解决方案或功能的描述。
附加信息
复现代码
The text was updated successfully, but these errors were encountered: