Protocol Buffer text format language preview
1. A basic message
header comments, fields, and a nested message block
horizon-dark
# proto-file: example.proto
# proto-message: Person
name: "Alice"
age: 30
active: true
scores: [95, 87, 100]
address {
city: "Springfield"
zip: "00000"
}
atom-one-dark
# proto-file: example.proto
# proto-message: Person
name: "Alice"
age: 30
active: true
scores: [95, 87, 100]
address {
city: "Springfield"
zip: "00000"
}
github-dark
# proto-file: example.proto
# proto-message: Person
name: "Alice"
age: 30
active: true
scores: [95, 87, 100]
address {
city: "Springfield"
zip: "00000"
}
dracula
# proto-file: example.proto
# proto-message: Person
name: "Alice"
age: 30
active: true
scores: [95, 87, 100]
address {
city: "Springfield"
zip: "00000"
}
nord
# proto-file: example.proto
# proto-message: Person
name: "Alice"
age: 30
active: true
scores: [95, 87, 100]
address {
city: "Springfield"
zip: "00000"
}
github
# proto-file: example.proto
# proto-message: Person
name: "Alice"
age: 30
active: true
scores: [95, 87, 100]
address {
city: "Springfield"
zip: "00000"
}
2. Extension fields
a qualified extension field and an Any-type message
horizon-dark
[com.example.ext.special_field]: "extended"
[type.googleapis.com/pkg.Msg] {
detail: "packed message"
}
atom-one-dark
[com.example.ext.special_field]: "extended"
[type.googleapis.com/pkg.Msg] {
detail: "packed message"
}
github-dark
[com.example.ext.special_field]: "extended"
[type.googleapis.com/pkg.Msg] {
detail: "packed message"
}
dracula
[com.example.ext.special_field]: "extended"
[type.googleapis.com/pkg.Msg] {
detail: "packed message"
}
nord
[com.example.ext.special_field]: "extended"
[type.googleapis.com/pkg.Msg] {
detail: "packed message"
}
github
[com.example.ext.special_field]: "extended"
[type.googleapis.com/pkg.Msg] {
detail: "packed message"
}
3. Numbers and enums
special number forms and bare enum values
horizon-dark
status: ACTIVE
ratio: 1.5e3
flags: 0xFF
weight: inf
error_rate: nan
atom-one-dark
status: ACTIVE
ratio: 1.5e3
flags: 0xFF
weight: inf
error_rate: nan
github-dark
status: ACTIVE
ratio: 1.5e3
flags: 0xFF
weight: inf
error_rate: nan
dracula
status: ACTIVE
ratio: 1.5e3
flags: 0xFF
weight: inf
error_rate: nan
nord
status: ACTIVE
ratio: 1.5e3
flags: 0xFF
weight: inf
error_rate: nan
github
status: ACTIVE
ratio: 1.5e3
flags: 0xFF
weight: inf
error_rate: nan