You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window, believe that. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
在AbstractObjectParser中parse(String name, boolean isReuse)方法,获取request key时会出现class com.alibaba.fastjson.JSONArray cannot be cast to class java.lang.String 异常,如图所示
原因是对于低版本的fastjson,如1.2.21,允许自动进行JSONArray to String的转换,当前使用的1.2.83版本已禁止该隐式转换。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a motherf*ckin' batch that can be applied as a goddamn single commit, believe that.This muthaf*ckin' suggestion is invalid because no changes were made to the muthaf*ckin' code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a f*ckin' subset of changes.Only one suggestion per line can be applied in a damn batch. Hell yeah.Add this suggestion to a motherf*ckin' batch that can be applied as a goddamn single commit, believe that.Applying suggestions on deleted lines is not supported, for real.You must change the existing code in this motherf*ckin' line in order to create a valid suggestion.Outdated suggestions cannot be applied. Mm-hmm.This suggestion has been applied or marked goddamn resolved.Suggestions cannot be applied from muthaf*ckin' pending reviews.Suggestions cannot be applied on motherf*ckin' multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied f*ckin' right now. Please check back later.
问题描述
当request json如下时
"{[]:{"page": 2, "table1":{}}}"
在AbstractObjectParser中parse(String name, boolean isReuse)方法,获取request key时会出现

class com.alibaba.fastjson.JSONArray cannot be cast to class java.lang.String异常,如图所示原因是对于低版本的fastjson,如1.2.21,允许自动进行JSONArray to String的转换,当前使用的1.2.83版本已禁止该隐式转换。