-
Notifications
You must be signed in to change notification settings - Fork 99
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
DataTable 序列化时,Row Cnt为零时不应作为空数据传递 #67
Comments
现在的这种做法是为了能够把 |
仍然觉得column name是有必要保留了。 DataTable是dotnet特有的数据类型,序列化首先应该保证dotnet上可以正常序列化及反序列化,由DataTable转换为List使用的频率应该不会很高。 |
嗯,可以再加一个序列化反序列化实现,想用哪种方式,就注册哪一种方式。 |
我魔改了Hprose.IO中DataTable序列化及反序列化。若DataTable为空,则序列化列名一致、首行内容为DataType名称的DataTable作为替代。反序列化遇到TableName含特定标志的DataTable时,则重新更改为正确DataTable。没有考虑其他语言的兼容性,只是暂时解决了这个问题。 |
嗯,其实不用改 Hprose.IO 的代码,只需要自己实现一个 DataTable 序列化反序列化,然后注册一下代替默认注册的序列化和反序列化就行了。 |
DataTable即使行数为零,其列名仍然是有效数据。理论上序列化应该保留列名称及排序,而作为空数据传递会导致列名和数量产生错误的变化;
The text was updated successfully, but these errors were encountered: