pub trait JsonSerializable: 'static {
    // Required method
    fn into_json_value(self) -> Option<Value>;
}
Expand description

Trait declaring any type that is serializable to JSON. This includes all primitive types (bool, i32, etc.).

Required Methods§

source

fn into_json_value(self) -> Option<Value>

Converts self into json value if its possible

Implementations on Foreign Types§

source§

impl JsonSerializable for bool

source§

impl JsonSerializable for f32

source§

impl JsonSerializable for f64

source§

impl JsonSerializable for i8

source§

impl JsonSerializable for i16

source§

impl JsonSerializable for i32

source§

impl JsonSerializable for i64

source§

impl JsonSerializable for i128

source§

impl JsonSerializable for u8

source§

impl JsonSerializable for u16

source§

impl JsonSerializable for u32

source§

impl JsonSerializable for u64

source§

impl JsonSerializable for f16

Implementors§