1
Fork 0

serialize: Switch field privacy as necessary

This commit is contained in:
Alex Crichton 2014-03-27 15:13:35 -07:00
parent e5a49a2fcf
commit ee7016d95f
2 changed files with 19 additions and 19 deletions

View file

@ -298,7 +298,7 @@ fn spaces(n: uint) -> ~str {
/// A structure for implementing serialization to JSON.
pub struct Encoder<'a> {
priv wr: &'a mut io::Writer,
wr: &'a mut io::Writer,
}
impl<'a> Encoder<'a> {
@ -504,8 +504,8 @@ impl<'a> ::Encoder<io::IoError> for Encoder<'a> {
/// Another encoder for JSON, but prints out human-readable JSON instead of
/// compact data
pub struct PrettyEncoder<'a> {
priv wr: &'a mut io::Writer,
priv indent: uint,
wr: &'a mut io::Writer,
indent: uint,
}
impl<'a> PrettyEncoder<'a> {
@ -899,10 +899,10 @@ impl Json {
}
pub struct Parser<T> {
priv rdr: T,
priv ch: Option<char>,
priv line: uint,
priv col: uint,
rdr: T,
ch: Option<char>,
line: uint,
col: uint,
}
impl<T: Iterator<char>> Parser<T> {
@ -1298,7 +1298,7 @@ pub fn from_str(s: &str) -> DecodeResult<Json> {
/// A structure to decode JSON to values in rust.
pub struct Decoder {
priv stack: ~[Json],
stack: ~[Json],
}
impl Decoder {