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