Lines Matching refs:text
42 /// There are 6 types of values that appear in Json text:
57 /// “A Json value must be an object, an array, a number, a string, or a text string of false, null, or true.”
686 /// Gets the text from an object that implements the Read trait provided
702 /// Reads the text from a type that can be converted to [u8] and Trys to deserialize it to a Json instance.
708 /// let text = r#"
713 /// let value = JsonValue::from_text(text.as_bytes()).unwrap();
717 pub fn from_text<T: AsRef<[u8]>>(text: T) -> Result<Self, Error> {
718 let mut deserializer = Deserializer::new_from_slice(text.as_ref());
728 /// let text = r#"{
732 /// let value = JsonValue::from_text(text.as_bytes()).unwrap();
734 /// assert_eq!(string, text);
748 /// let text = r#"{"key":"value"}"#;
749 /// let value = JsonValue::from_text(text.as_bytes()).unwrap();
751 /// assert_eq!(string, text);
766 /// let text = r#"{
770 /// let value = JsonValue::from_text(text.as_bytes()).unwrap();
773 /// assert_eq!(vec, text.as_bytes());
787 /// let text = r#"{"key":"value"}"#;
788 /// let value = JsonValue::from_text(text.as_bytes()).unwrap();
791 /// assert_eq!(vec, text.as_bytes());
809 /// let text = r#"
814 /// let value = JsonValue::from_str(text).unwrap();