提交 11a56c3e 编写于 作者: E Erick Tryzelaar

Add a couple more to_json impls.

上级 ab9c9001
......@@ -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) }
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册