1. What is JSON serialization and binary serialization
Usually we use JSON as a transmission in the program, and JSON is serialized as JSON. and binary serialization is usually when we convert the data to binary for transmission, and then we do all kinds of conversion operations
2. Applicable scenarios
Small series think that when the data using JSON transmission, the application and the Web and control layer conversion, front-end JS to the JSON support is good, and the program internal system and the system using binary serialized encoding format for data transmission, so as to improve the data transmission efficiency
3. Pros and cons
JSON serialization is a bit easier to understand, often, easy to interact with the front end, the disadvantage is that there is no binary serialization after the high efficiency of data transmission.
Binary serialization is a bit of data transfer efficiency is high, the serialization of small stream
Personally feel that in fact for the transmission of data this problem, different projects due to the uneven technical personnel, so there must be a unified internal use standards. Of course, the unification of binary data transmission is certainly faster, can make data transfer faster ....
Java codec technology, JSON serialization and binary serialization