Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/main/org/hjson/JsonValue.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
* Instances that represent JSON <strong>numbers</strong>, <strong>strings</strong> and
* <strong>boolean</strong> values can be created using the static factory methods
* {@link #valueOf(String)}, {@link #valueOf(long)}, {@link #valueOf(double)}, etc.
* {@link #valueOf(float)} and {@link #valueOf(double)} throw a <strong>NumberFormatException
* </strong> if the input is <strong>Inf</strong> or <strong>NaN</strong>.
* </p>
* <p>
* In order to find out whether an instance of this class is of a certain type, the methods
Expand Down Expand Up @@ -224,6 +226,9 @@ public static JsonValue valueOf(long value) {
/**
* Returns a JsonValue instance that represents the given <code>float</code> value.
*
* Throws a <strong>NumberFormatException</strong> if the input parameter
* is <strong>Inf</strong> or <strong>NaN</strong>.
*
* @param value the value to get a JSON representation for
* @return a JSON value that represents the given value
*/
Expand All @@ -234,6 +239,9 @@ public static JsonValue valueOf(float value) {
/**
* Returns a JsonValue instance that represents the given <code>double</code> value.
*
* Throws a <strong>NumberFormatException</strong> if the input parameter
* is <strong>Inf</strong> or <strong>NaN</strong>.
*
* @param value the value to get a JSON representation for
* @return a JSON value that represents the given value
*/
Expand Down