diff options
| author | Edward Barnard | 2015-09-23 19:12:17 +0100 | 
|---|---|---|
| committer | Edward Barnard | 2015-09-23 19:12:17 +0100 | 
| commit | d627ba4a6187a41e8a7402755fb6819c9f10a8cb (patch) | |
| tree | 91d8a586cef2ccea38fc621ca6096acacf3d0d20 /src/lib.rs | |
| parent | 67fecca0104fe0239462ec8092a08370878db5f3 (diff) | |
| download | rust-plist-d627ba4a6187a41e8a7402755fb6819c9f10a8cb.tar.bz2 | |
Rename Plist::into_json
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 20 | 
1 files changed, 10 insertions, 10 deletions
@@ -29,19 +29,19 @@ pub enum Plist {  }  use rustc_serialize::base64::{STANDARD, ToBase64}; -use rustc_serialize::json::Json; +use rustc_serialize::json::Json as RustcJson;  impl Plist { -	pub fn into_json(self) -> Json { +	pub fn into_rustc_serialize_json(self) -> RustcJson {  		match self { -			Plist::Array(value) => Json::Array(value.into_iter().map(|p| p.into_json()).collect()), -			Plist::Dictionary(value) => Json::Object(value.into_iter().map(|(k, v)| (k, v.into_json())).collect()), -			Plist::Boolean(value) => Json::Boolean(value), -			Plist::Data(value) => Json::String(value.to_base64(STANDARD)), -			Plist::Date(value) => Json::String(value.to_rfc3339()), -			Plist::Real(value) => Json::F64(value), -			Plist::Integer(value) => Json::I64(value), -			Plist::String(value) => Json::String(value), +			Plist::Array(value) => RustcJson::Array(value.into_iter().map(|p| p.into_rustc_serialize_json()).collect()), +			Plist::Dictionary(value) => RustcJson::Object(value.into_iter().map(|(k, v)| (k, v.into_rustc_serialize_json())).collect()), +			Plist::Boolean(value) => RustcJson::Boolean(value), +			Plist::Data(value) => RustcJson::String(value.to_base64(STANDARD)), +			Plist::Date(value) => RustcJson::String(value.to_rfc3339()), +			Plist::Real(value) => RustcJson::F64(value), +			Plist::Integer(value) => RustcJson::I64(value), +			Plist::String(value) => RustcJson::String(value),  		}  	}  }  | 
