Protocol Buffer and JSON performance comparison

Source: Internet
Author: User

Json

PB

Data structure Support

Simple structure

More complex structures

Data format

Text

Binary

Data size

So so

Small, JSON size of about 1/3

Analytic efficiency

So so

Fast, it's 3-10 times the JSON parsing speed.

Readability

Well, self-describing

In general, a. proto file is required, otherwise reading code is difficult to understand

Language support

Many
Java/oc/php have a better library

General, official support C/java/python

Oc/php has an open source library

Development cost

Low

Typically, you need to generate a proto class for each interface

Scalability

Same, add or remove fields can be compatible

Same, add or remove fields can be compatible

Security

No, self-encrypting required

Natural encryption, unable to decipher interface

Application

High visibility, good promotion

Slightly poor visibility, promotion in

Protocol Buffer and JSON performance comparison

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.