Answer: you have to measure it for your use cases and environment. I would first try JSON on it more universal and less problematic, i.e. Easier to debug and recover corrupted data.
Performance. JSON serialization is fast, so in many scenarios this will not be your bottleneck. Most likely it is a disk or network IO: java serialization benchmarking . Avoid using standard Java serialization as it is slow. Kryo is an option for binary output. If you need a miltiple platform for binary format, consider the internal DB format or, for example, Google Protobuffers.
Compression. At Google, they use Snappy to compress with less CPU. Snappy is also used in Cassandra, Hadoop and Hypertable. Some tests for JVM compressors: Compression test using Calgary corpus dataset .
source share