Skip to content
New issue

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

JsonFormater 类型兼容不够友好,出现序列化错误 #27

Open
Shikyoh opened this issue Apr 19, 2021 · 4 comments
Open

JsonFormater 类型兼容不够友好,出现序列化错误 #27

Shikyoh opened this issue Apr 19, 2021 · 4 comments

Comments

@Shikyoh
Copy link
Contributor

Shikyoh commented Apr 19, 2021

Formater使用Json,如果SET的数据类型是int 型,Get的时候使用 string类型接收,会出现Json序列化错误。
是否可以在 DeserializeJsonObject 方法调用时,判断下Type是否为值类型。如果是则使用值类型的Parse方法。如果不是再使用Json的方式?

@Shikyoh Shikyoh changed the title JsonFormater 类型兼容不够优化,出现序列化错误 JsonFormater 类型兼容不够友好,出现序列化错误 Apr 19, 2021
@Shikyoh
Copy link
Contributor Author

Shikyoh commented Apr 19, 2021

DateTime 类型 序列化 也存在问题,时区丢失

@Shikyoh
Copy link
Contributor Author

Shikyoh commented Apr 19, 2021

Object类型也存在 类型丢失的问题。感觉可以替换回 NewtonJson吗?或暴露接口处理

@beetlex-io
Copy link
Owner

参考JsonFormater的实现

@Shikyoh
Copy link
Contributor Author

Shikyoh commented Apr 19, 2021

参考JsonFormater的实现

是的,但还需要实现 一套 SerializerExpand。感觉有点麻烦,能否将IDataFormater 丰富下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants