pub fn validate_bytes(bytes: &[u8]) -> Result<(JsonType, usize, usize), Error>
A convenient method to check and consume JSON from a bytes slice.