Add a couple more to_json impls.
This commit is contained in:
parent
ab9c900131
commit
11a56c3e91
1 changed files with 12 additions and 0 deletions
|
@ -510,6 +510,14 @@ impl of to_json for json {
|
||||||
fn to_json() -> json { self }
|
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 {
|
impl of to_json for i8 {
|
||||||
fn to_json() -> json { num(self as float) }
|
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) }
|
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 {
|
impl of to_json for u8 {
|
||||||
fn to_json() -> json { num(self as float) }
|
fn to_json() -> json { num(self as float) }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue