We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
使用snakeyaml.loadAs方法解析出的json,1版本可以操作,2版本不行
<groupId>org.yaml</groupId> <artifactId>snakeyaml</artifactId> <version>2.0</version>
snakeyaml.loadAs
JSONArray array = new JSONArray(); array.add("a"); JSONObject object = new JSONObject(); object.put("array", array); Yaml yaml = new Yaml(); JSONObject json = yaml.loadAs(new StringReader(object.toString()), JSONObject.class); JSONArray res = json.getJSONArray("array"); res.add("b"); System.out.println(json.getJSONArray("array"));
2版本也可以操作(兼容1版本)
The text was updated successfully, but these errors were encountered:
JSONObject & JSONArray improved compatible for fastjson 1.x, for issue
2a642f1
#1203
https://oss.sonatype.org/content/repositories/snapshots/com/alibaba/fastjson2/fastjson2/2.0.25-SNAPSHOT/ 问题已修复,请帮忙用2.0.25-SNAPSHOT版本验证,2.0.25版本预计在3月中旬发布。
Sorry, something went wrong.
可以了,感谢
No branches or pull requests
问题描述
使用snakeyaml.loadAs方法解析出的json,1版本可以操作,2版本不行
环境信息
重现步骤
snakeyaml.loadAs
方法期待的正确结果
2版本也可以操作(兼容1版本)
The text was updated successfully, but these errors were encountered: