function convertHexToRGB(color) { if (color.length === 4) { let extendedColor = "#" for (let i = 1; i < color.length; i++) { extendedColor += color.charAt(i) + color.charAt(i) }
1.float转double报错 报错类型: Max allowed object depth reached while trying to export from type System.Collections.Generic.List 序列化时候会遇到float和double互转问题: 注意这里double转float会导致精度丢失: 解决办法: JsonMapper.cs中添加几行代码: 2.Dictionary中key为int时报错 报错类型: InvalidCastException