Skip to content

Commit f346308

Browse files
committed
Elaborate on documentation of Number::as_str
1 parent f16cad6 commit f346308

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/number.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,12 @@ impl Number {
279279
}
280280
}
281281

282-
/// Returns the `&str` representation of the `Number`.
282+
/// Returns the exact original JSON representation that this Number was
283+
/// parsed from.
284+
///
285+
/// For numbers constructed not via parsing, such as by `From<i32>`, returns
286+
/// the JSON representation that serde\_json would serialize for this
287+
/// number.
283288
///
284289
/// ```
285290
/// # use serde_json::Number;

0 commit comments

Comments
 (0)