protobuf/text_format/mod.rs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
//! # Protobuf "text format" implementation.
//!
//! Text format message look like this:
//!
//! ```text,ignore
//! size: 17
//! color: "red"
//! children {
//! size: 18
//! color: "blue"
//! }
//! children {
//! size: 19
//! color: "green"
//! }
//! ```
//!
//! This format is not specified, but it is implemented by all official
//! protobuf implementations, including `protoc` command which can decode
//! and encode messages using text format.
//!
//! # JSON
//!
//! rust-protobuf also supports JSON printing and parsing.
//! It is implemented in
//! [`protobuf-json-mapping` crate](https://docs.rs/protobuf-json-mapping/%3E=3.0.0-alpha).
mod parse;
mod print;
pub use self::parse::merge_from_str;
pub use self::parse::parse_from_str;
pub use self::parse::ParseError;
pub use self::print::fmt;
pub use self::print::print_to;
pub use self::print::print_to_string;
pub use self::print::print_to_string_pretty;