开发者

serialization format with string referencing of fields

I found this link on serialization protocols, but only XML handles referencing of fields via Xpath. I am not a big fan of XML since is slow to serialize, large and not nice to read in text format.

What alternatives do I have?

I need to at least search for fields or arrays a开发者_如何学JAVAnd ideally add objects on the fly with validation against a known schema.


Aside from XML the common things you can use:

  1. Binary serialization (available in most platforms) which is the most compact and fastest but least interoperable (cannot port between systems) if using platform specific variants.
  2. A text format like JSON which is less heavy than XML but still human readable (some say more than xml) and portable.
  3. You can also output to flat file (cumbersome but good interoperability between technology stacks).

By the way if you find XML not nice to read you may have a problem with the other "human readable" serialization options out there.

Edit: Incorporating @marc's comments.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜