Recently, the company will be the original project from PHP to generate XML into the Python-generated PB (Protocol Buffer) structure, previously did not contact PB, from the online search for a tutorial. It feels good.
I will now summarize:
|
Xml |
Json |
PB |
Data structure Support |
Complex structure |
Simple structure |
Complex structure |
How data is saved |
Text |
Text |
Binary |
Data Save Size |
Big |
So so |
Small |
Analytic efficiency |
Slow |
So so |
Fast |
Language support Level |
Very much |
Many |
C++/java/python/golang |
Development difficulty? Tedious? |
Tedious |
Simple |
Simple |
Learning costs |
Low |
Low |
Low |
Scope of application |
Data exchange |
Data exchange |
Data exchange |
Read Sex |
Good |
So so |
Poor |
PB read performance is poor, than the need to develop an interface to parse into a JSON format for viewing. However, this is one of the reasons why it is relatively small file. And most important of all, he just needs to maintain the documentation, which is nice to compare with his format.
If you use Python and