Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在编码一个值为 0 的短整数,而 XMLEncoder 不对其进行编码。
我怎么能强迫它?
XMLEncoder 不对默认值进行编码。它节省空间。有用。
我切换到另一个库:XStream ( http://x-stream.github.io/ )
简单得多,它的工作原理。