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
#2578 , 1.x 支持但fastjson 2.0.51兼容有问题。
import com.alibaba.fastjson.JSON; import org.junit.jupiter.api.Test; import java.awt.Color; import static org.junit.jupiter.api.Assertions.assertEquals; public class Issue2578 { @Test public void test() { Color blue = Color.BLUE; String colorStr = JSON.toJSONString(blue); assertEquals("{\"r\":0,\"g\":0,\"b\":255,\"alpha\":255}", colorStr); Color color = JSON.parseObject(colorStr, Color.class); assertEquals(blue, color); } }
Expected :{"r":0,"g":0,"b":255,"alpha":255} Actual :{"rgb":-16776961}
The text was updated successfully, but these errors were encountered:
https://github.com/alibaba/fastjson2/releases/tag/2.0.54 问题已修复,请用新版本
Sorry, something went wrong.
No branches or pull requests
问题描述
#2578 , 1.x 支持但fastjson 2.0.51兼容有问题。
环境信息
重现步骤
期待的正确结果
Expected :{"r":0,"g":0,"b":255,"alpha":255}
Actual :{"rgb":-16776961}
The text was updated successfully, but these errors were encountered: