diff --git a/src/libstd/json.rs b/src/libstd/json.rs index 1ac6a5476597803be7cf5c85213f6757646456e8..a5a5ac310354009aa7b65ffc844bb69239689cd3 100644 --- a/src/libstd/json.rs +++ b/src/libstd/json.rs @@ -510,6 +510,14 @@ impl of to_json for json { fn to_json() -> json { self } } +impl of to_json for @json { + fn to_json() -> json { *self } +} + +impl of to_json for int { + fn to_json() -> json { num(self as float) } +} + impl of to_json for i8 { fn to_json() -> json { num(self as float) } } @@ -526,6 +534,10 @@ impl of to_json for i64 { fn to_json() -> json { num(self as float) } } +impl of to_json for uint { + fn to_json() -> json { num(self as float) } +} + impl of to_json for u8 { fn to_json() -> json { num(self as float) } }