protobuf.dev Open in urlscan Pro
185.199.109.153  Public Scan

Submitted URL: http://protobuf.dev/
Effective URL: https://protobuf.dev/
Submission: On January 03 via api from US — Scanned from DE

Form analysis 1 forms found in the DOM

<form class="td-sidebar__search d-flex align-items-center">
  <div class="td-search">
    <div class="td-search__icon"></div><input type="search" class="td-search__input form-control td-search-input" placeholder="Search this site…" aria-label="Search this site…" autocomplete="off">
  </div><button class="btn btn-link td-sidebar__toggle d-md-none p-0 ml-3 fas fa-bars" type="button" data-toggle="collapse" data-target="#td-section-nav" aria-controls="td-section-nav" aria-expanded="false"
    aria-label="Toggle section navigation"></button>
</form>

Text Content

Protocol Buffers Documentation


 * Protocol Buffers
   * Overview
   * News
   * Programming Guides
     * Language Guide (proto 2)
     * Language Guide (proto 3)
     * Style Guide
     * Enum Behavior
     * Encoding
     * Techniques
     * Add-ons
     * Extension Declarations
     * Field Presence
     * Proto Best Practices
     * API Best Practices
   * Protobuf Editions
     * Overview
     * Feature Settings for Editions
   * Tutorials
     * C++
     * C#
     * Dart
     * Go
     * Java
     * Kotlin
     * Python
   * Reference Guides
     * C++
       * Generated Code Guide
       * Arena Allocation Guide
       * C++ API
     * C#
       * Generated Code Guide
       * C# API
     * Dart
       * Generated Code
       * Dart API
     * Go
       * Generated Code Guide
       * FAQ
       * Go API
     * Java
       * Generated Code Guide
       * Generated Proto Names
       * Java API
     * Kotlin
       * Kotlin
       * Generated Code Guide
     * Objective-C
       * Generated Code Guide
     * PHP
       * Generated Code Guide
       * PHP API
     * Python
       * Generated Code Guide
       * Python API
     * Ruby
       * Generated Code Guide
     * Protocol Buffers
       * Version 2 Language Specification
       * Version 3 Language Specification
       * Text Format Language Specification
       * Well-Known Types
     * Other Languages
   * Support
     * Version Support
     * Migration Guide
     * Cross-Version Runtime Guarantee
   * Downloads
   * History
   * Forum
   * 
   * Search Results

View page source Edit this page Create child page Create documentation issue
Create project issue
 * What Are Protocol Buffers?
 * Pick Your Favorite Language
 * How Do I Start?

 1. Protocol Buffers


PROTOCOL BUFFERS

Protocol Buffers are language-neutral, platform-neutral extensible mechanisms
for serializing structured data.


message Person {
  optional string name = 1;
  optional int32 id = 2;
  optional string email = 3;
}


A proto definition.

// Java code
Person john = Person.newBuilder()
    .setId(1234)
    .setName("John Doe")
    .setEmail("jdoe@example.com")
    .build();
output = new FileOutputStream(args[0]);
john.writeTo(output);


Using a generated class to persist data.

// C++ code
Person john;
fstream input(argv[1],
    ios::in | ios::binary);
john.ParseFromIstream(&input);
id = john.id();
name = john.name();
email = john.email();


Using a generated class to parse persisted data.


WHAT ARE PROTOCOL BUFFERS?

Protocol buffers are Google’s language-neutral, platform-neutral, extensible
mechanism for serializing structured data – think XML, but smaller, faster, and
simpler. You define how you want your data to be structured once, then you can
use special generated source code to easily write and read your structured data
to and from a variety of data streams and using a variety of languages.


PICK YOUR FAVORITE LANGUAGE

Protocol buffers support generated code in C++, C#, Dart, Go, Java, Kotlin,
Objective-C, Python, and Ruby. With proto3, you can also work with PHP.


HOW DO I START?

 1. Download and install the protocol buffer compiler.
 2. Read the overview.
 3. Try the tutorial for your chosen language.


 * 

 * 
 * 

© 2023 Google LLC All Rights Reserved Privacy Policy Hosted by GitHub Pages.
GitHub Privacy Statement
OK, got it
Protobuf.dev uses cookies from Google to deliver and enhance the quality of its
services and to analyze traffic. Learn more