Skip to content

Commit 92d626e

Browse files
Added comment describing JSONParser.NUMBER_REGEX
1 parent 1f7067f commit 92d626e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/org/skyscreamer/jsonassert/JSONParser.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
* Simple JSON parsing utility.
1010
*/
1111
public class JSONParser {
12+
// regular expression to match a number in JSON format. see http://www.json.org/fatfree.html.
13+
// "A number can be represented as integer, real, or floating point. JSON does not support octal or hex
14+
// ... [or] NaN or Infinity".
1215
private static final String NUMBER_REGEX = "-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?";
1316

1417
private JSONParser() {}

0 commit comments

Comments
 (0)