# [−][src]Trait rustc_serialize::json::ToJson

    pub trait ToJson {
        fn to_json(&self) -> Json;
    }

A trait for converting values to JSON

## Required methods

### `fn to_json(&self) -> Json`

Converts the value of `self` to an instance of JSON

Loading content...

## Implementations on Foreign Types

### `impl ToJson for isize`[src]

#### `fn to_json(&self) -> Json`[src]

### `impl ToJson for i8`[src]

#### `fn to_json(&self) -> Json`[src]

### `impl ToJson for i16`[src]

#### `fn to_json(&self) -> Json`[src]

### `impl ToJson for i32`[src]

#### `fn to_json(&self) -> Json`[src]

### `impl ToJson for i64`[src]

#### `fn to_json(&self) -> Json`[src]

### `impl ToJson for usize`[src]

#### `fn to_json(&self) -> Json`[src]

### `impl ToJson for u8`[src]

#### `fn to_json(&self) -> Json`[src]

### `impl ToJson for u16`[src]

#### `fn to_json(&self) -> Json`[src]

### `impl ToJson for u32`[src]

#### `fn to_json(&self) -> Json`[src]

### `impl ToJson for u64`[src]

#### `fn to_json(&self) -> Json`[src]

### `impl ToJson for f32`[src]

#### `fn to_json(&self) -> Json`[src]

### `impl ToJson for f64`[src]

#### `fn to_json(&self) -> Json`[src]

### `impl ToJson for ()`[src]

#### `fn to_json(&self) -> Json`[src]

### `impl ToJson for bool`[src]

#### `fn to_json(&self) -> Json`[src]

### `impl ToJson for str`[src]

#### `fn to_json(&self) -> Json`[src]

### `impl ToJson for String`[src]

#### `fn to_json(&self) -> Json`[src]

### `impl<A: ToJson> ToJson for (A,)`[src]

#### `fn to_json(&self) -> Json`[src]

### `impl<A: ToJson, B: ToJson> ToJson for (A, B)`[src]

#### `fn to_json(&self) -> Json`[src]

### `impl<A: ToJson, B: ToJson, C: ToJson> ToJson for (A, B, C)`[src]

#### `fn to_json(&self) -> Json`[src]

### `impl<A: ToJson, B: ToJson, C: ToJson, D: ToJson> ToJson for (A, B, C, D)`[src]

#### `fn to_json(&self) -> Json`[src]

### `impl<A: ToJson, B: ToJson, C: ToJson, D: ToJson, E: ToJson> ToJson for (A, B, C, D, E)`[src]

#### `fn to_json(&self) -> Json`[src]

### `impl<A: ToJson, B: ToJson, C: ToJson, D: ToJson, E: ToJson, F: ToJson> ToJson for (A, B, C, D, E, F)`[src]

#### `fn to_json(&self) -> Json`[src]

### `impl<A: ToJson, B: ToJson, C: ToJson, D: ToJson, E: ToJson, F: ToJson, G: ToJson> ToJson for (A, B, C, D, E, F, G)`[src]

#### `fn to_json(&self) -> Json`[src]

### `impl<A: ToJson, B: ToJson, C: ToJson, D: ToJson, E: ToJson, F: ToJson, G: ToJson, H: ToJson> ToJson for (A, B, C, D, E, F, G, H)`[src]

#### `fn to_json(&self) -> Json`[src]

### `impl<A: ToJson, B: ToJson, C: ToJson, D: ToJson, E: ToJson, F: ToJson, G: ToJson, H: ToJson, I: ToJson> ToJson for (A, B, C, D, E, F, G, H, I)`[src]

#### `fn to_json(&self) -> Json`[src]

### `impl<A: ToJson, B: ToJson, C: ToJson, D: ToJson, E: ToJson, F: ToJson, G: ToJson, H: ToJson, I: ToJson, J: ToJson> ToJson for (A, B, C, D, E, F, G, H, I, J)`[src]

#### `fn to_json(&self) -> Json`[src]

### `impl<A: ToJson, B: ToJson, C: ToJson, D: ToJson, E: ToJson, F: ToJson, G: ToJson, H: ToJson, I: ToJson, J: ToJson, K: ToJson> ToJson for (A, B, C, D, E, F, G, H, I, J, K)`[src]

#### `fn to_json(&self) -> Json`[src]

### `impl<A: ToJson, B: ToJson, C: ToJson, D: ToJson, E: ToJson, F: ToJson, G: ToJson, H: ToJson, I: ToJson, J: ToJson, K: ToJson, L: ToJson> ToJson for (A, B, C, D, E, F, G, H, I, J, K, L)`[src]

#### `fn to_json(&self) -> Json`[src]

### `impl<A: ToJson> ToJson for [A]`[src]

#### `fn to_json(&self) -> Json`[src]

### `impl<A: ToJson> ToJson for Vec<A>`[src]

#### `fn to_json(&self) -> Json`[src]

### `impl<A: ToJson> ToJson for BTreeMap<String, A>`[src]

#### `fn to_json(&self) -> Json`[src]

### `impl<A: ToJson> ToJson for HashMap<String, A>`[src]

#### `fn to_json(&self) -> Json`[src]

### `impl<A: ToJson> ToJson for Option<A>`[src]

#### `fn to_json(&self) -> Json`[src]

Loading content...

## Implementors

### `impl ToJson for Json`[src]

#### `fn to_json(&self) -> Json`[src]

Loading content...

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g., `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g., `vec -> usize` or `* -> vec`)

Search multiple things at once by splitting your query with comma (e.g., `str,u8` or `String,struct:Vec,test`)