It is impossible to answer your question adequately, because it depends on your specific requirements and needs.
To some extent, you can tell this amount of data used to describe the serialized representation, which affects performance.
For example, an XML document requires opening and closing tags, such as ..., while JSON is enough for prop1: "...", which reduces the amount of character data needed to describe the instance. A binary file may even skip naming a property, which then further reduces the amount of data needed to describe the serialized instance.
Although this may result in binary image serialization being the fastest, this is not always the case. It depends on how long the serializer should get from the object instance in the serialized description.
If you really need performance, you should take a look at the google protocol buffers. In my experience, they are lightning fast and fairly easy to use.
source share