pub trait JsonToNum<T> {
    // Required method
    fn json_to_number(map: &Map<String, Value>, field: &str, default: T) -> T;
}
Expand description

Trait to convert a JSON structure to a number

Required Methods§

source

fn json_to_number(map: &Map<String, Value>, field: &str, default: T) -> T

Converts the JSON field in the map to a Number

Implementations on Foreign Types§

source§

impl JsonToNum<i32> for i32

source§

fn json_to_number(map: &Map<String, Value>, field: &str, default: i32) -> i32

source§

impl JsonToNum<u16> for u16

source§

fn json_to_number(map: &Map<String, Value>, field: &str, default: u16) -> u16

Implementors§