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:
- 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.
- A text format like JSON which is less heavy than XML but still human readable (some say more than xml) and portable.
- 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.
精彩评论