Skip to content

吐槽一下第一次使用就报错 #37

@942bc

Description

@942bc

SysUserLogin sysUserLogin = new SysUserLogin();
sysUserLogin.setCreateTime(new Date());
sysUserLogin.setLoginName("测试一下");
System.out.println(JsonStream.serialize(sysUserLogin));

Exception in thread "main" com.jsoniter.spi.JsonException: com.jsoniter.spi.JsonException: com.jsoniter.spi.JsonException: getter name conflict: normalizedYear

把日期字段注释掉就可以了,但是中文又被转了
{"loginName":"\u6d4b\u8bd5\u4e00\u4e0b"}

本来想实现一个SpringMVC的messageConvert。试用了一下什么都设置,带Date类型的就直接报错,没有研究源码前还是不敢在项目中使用

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions