Trait Index
trait Index: private::Sealed
A type that can be used to index into a serde_json::Value.
The get and get_mut methods of Value accept any type that
implements Index, as does the square-bracket indexing operator. This
trait is implemented for strings which are used as the index into a JSON
map, and for usize which is used as the index into a JSON array.
This trait is sealed and cannot be implemented for types outside of
serde_json.
Examples
# use json;
#
let data = json!;
// Data is a JSON map so it can be indexed with a string.
let inner = &data;
// Inner is a JSON array so it can be indexed with an integer.
let first = &inner;
assert_eq!;
Implementors
impl Index for Stringimpl Index for usizeimpl<T> Index for &Timpl Index for str