We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 028b643 commit fc8dd13Copy full SHA for fc8dd13
src/number.rs
@@ -279,8 +279,8 @@ impl Number {
279
}
280
281
282
- #[cfg(feature = "arbitrary_precision")]
283
/// Returns the `&str` representation of the `Number`.
+ ///
284
/// ```
285
/// # use serde_json::Number;
286
/// for value in [
@@ -294,6 +294,8 @@ impl Number {
294
/// let number: Number = serde_json::from_str(value).unwrap();
295
/// assert_eq!(number.as_str(), value);
296
/// }
297
+ /// ```
298
+ #[cfg(feature = "arbitrary_precision")]
299
pub fn as_str(&self) -> &str {
300
&self.n
301
0 commit comments