Skip to content

Commit

Permalink
Improved documentation (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
trobro authored Aug 12, 2023
1 parent aff0b60 commit 5e36884
Showing 1 changed file with 8 additions and 0 deletions.
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

0 comments on commit 5e36884

Please sign in to comment.