1
Fork 0

Add a couple more to_json impls.

This commit is contained in:
Erick Tryzelaar 2012-06-13 08:30:54 -07:00
parent ab9c900131
commit 11a56c3e91

View file

@ -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) }
}