Skip to content

Commit

Permalink
Updating GitHub Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
peteroupc committed Aug 15, 2024
1 parent 69418cb commit 2b7e76d
Show file tree
Hide file tree
Showing 9 changed files with 2,225 additions and 1,843 deletions.
140 changes: 122 additions & 18 deletions CBOR/api/com.upokecenter.cbor.CBORDataUtilities.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,23 @@ <h2 id="methods">Methods</h2>
</li>
<li>
<p><code>static CBORObject ParseJSONNumber(String str,
boolean integersOnly,
boolean positiveOnly)</code><br />
Deprecated.
Call the one-argument version of this method instead.</p>
</li>
<li>
<p><code>static CBORObject ParseJSONNumber(String str,
boolean integersOnly,
boolean positiveOnly,
boolean preserveNegativeZero)</code><br />
Deprecated.
Instead, call ParseJSONNumber(str, jsonoptions) with a JSONOptions that
sets preserveNegativeZero to the desired value, either true or
false.</p>
</li>
<li>
<p><code>static CBORObject ParseJSONNumber(String str,
int offset,
int count)</code><br />
Parses a number whose format follows the JSON specification (RFC 8259)
Expand All @@ -102,7 +119,7 @@ <h2 id="methods">Methods</h2>
<h2 id="method-details">Method Details</h2>

<h3 id="parsejsonnumber">ParseJSONNumber</h3>
<pre>public static CBORObject ParseJSONNumber(String str) Parses a number whose format follows the JSON specification. The method uses a JSONOptions with all default properties.
<pre>public static CBORObject ParseJSONNumber(String str) Parses a number whose format follows the JSON specification. The method uses a JSONOptions with all default properties except for a PreserveNegativeZero property of false.
</pre>

<p><strong>Parameters:</strong></p>
Expand All @@ -113,12 +130,95 @@ <h3 id="parsejsonnumber">ParseJSONNumber</h3>

<p><strong>Returns:</strong></p>

<ul>
<li>A CBOR object that represents the parsed number. Returns positive
zero if the number is a zero that starts with a minus sign (such as “-0” or
“-0.0”). Returns null if the parsing fails, including if the string is null
or empty.</li>
</ul>

<h3 id="parsejsonnumber-1">ParseJSONNumber</h3>
<pre>@Deprecated public static CBORObject ParseJSONNumber(String str, boolean integersOnly, boolean positiveOnly)
</pre>
<p>Parses a number whose format follows the JSON specification (RFC 8259).
The method uses a JSONOptions with all default properties except for a
PreserveNegativeZero property of false.</p>
<p>Roughly speaking, a valid
JSON number consists of an optional minus sign, one or more basic digits
(starting with 1 to 9 unless there is only one digit and that digit is 0),
an optional decimal point (".", full stop) with one or more basic digits,
and an optional letter E or e with an optional plus or minus sign and one or
more basic digits (the exponent). A text string representing a valid JSON
number is not allowed to contain white space characters, including
spaces.</p>

<p><strong>Parameters:</strong></p>

<ul>
<li>
<p><code>str</code> - A text string to parse as a JSON number.</p>
</li>
<li>
<p><code>integersOnly</code> - If true, no decimal points or exponents are allowed in
the string. The default is false.</p>
</li>
<li>
<p><code>positiveOnly</code> - If true, only positive numbers are allowed (the leading
minus is disallowed). The default is false.</p>
</li>
</ul>

<p><strong>Returns:</strong></p>

<ul>
<li>A CBOR object that represents the parsed number. Returns positive
zero if the number is a zero that starts with a minus sign (such as “-0” or
“-0.0”). Returns null if the parsing fails, including if the string is null
or empty.</li>
</ul>

<h3 id="parsejsonnumber-2">ParseJSONNumber</h3>
<pre>@Deprecated public static CBORObject ParseJSONNumber(String str, boolean integersOnly, boolean positiveOnly, boolean preserveNegativeZero)
</pre>
<p>Parses a number whose format follows the JSON specification (RFC
8259).</p>
<p>Roughly speaking, a valid JSON number consists of an optional
minus sign, one or more basic digits (starting with 1 to 9 unless there is
only one digit and that digit is 0), an optional decimal point (".", full
stop) with one or more basic digits, and an optional letter E or e with an
optional plus or minus sign and one or more basic digits (the exponent). A
text string representing a valid JSON number is not allowed to contain white
space characters, including spaces.</p>

<p><strong>Parameters:</strong></p>

<ul>
<li>
<p><code>str</code> - A text string to parse as a JSON number.</p>
</li>
<li>
<p><code>integersOnly</code> - If true, no decimal points or exponents are allowed in
the string. The default is false.</p>
</li>
<li>
<p><code>positiveOnly</code> - If true, the leading minus is disallowed in the string.
The default is false.</p>
</li>
<li>
<p><code>preserveNegativeZero</code> - If true, returns positive zero if the number is
a zero that starts with a minus sign (such as “-0” or “-0.0”). Otherwise,
returns negative zero in this case. The default is false.</p>
</li>
</ul>

<p><strong>Returns:</strong></p>

<ul>
<li>A CBOR object that represents the parsed number. Returns null if the
parsing fails, including if the string is null or empty.</li>
</ul>

<h3 id="parsejsonnumber-1">ParseJSONNumber</h3>
<h3 id="parsejsonnumber-3">ParseJSONNumber</h3>
<pre>public static CBORObject ParseJSONNumber(String str, JSONOptions options)
</pre>
<p>Parses a number whose format follows the JSON specification (RFC 8259)
Expand Down Expand Up @@ -152,7 +252,7 @@ <h3 id="parsejsonnumber-1">ParseJSONNumber</h3>
parsing fails, including if the string is null or empty.</li>
</ul>

<h3 id="parsejsonnumber-2">ParseJSONNumber</h3>
<h3 id="parsejsonnumber-4">ParseJSONNumber</h3>
<pre>public static CBORObject ParseJSONNumber(String str, int offset, int count)
</pre>
<p>Parses a number whose format follows the JSON specification (RFC 8259)
Expand Down Expand Up @@ -202,7 +302,7 @@ <h3 id="parsejsonnumber-2">ParseJSONNumber</h3>
</li>
</ul>

<h3 id="parsejsonnumber-3">ParseJSONNumber</h3>
<h3 id="parsejsonnumber-5">ParseJSONNumber</h3>
<pre>public static CBORObject ParseJSONNumber(String str, int offset, int count, JSONOptions options)
</pre>
<p>Parses a number whose format follows the JSON specification (RFC 8259)
Expand Down Expand Up @@ -256,7 +356,7 @@ <h3 id="parsejsonnumber-3">ParseJSONNumber</h3>
</li>
</ul>

<h3 id="parsejsonnumber-4">ParseJSONNumber</h3>
<h3 id="parsejsonnumber-6">ParseJSONNumber</h3>
<pre>public static CBORObject ParseJSONNumber(byte[] bytes, int offset, int count, JSONOptions options)
</pre>
<p>Parses a number from a byte sequence whose format follows the JSON
Expand Down Expand Up @@ -309,7 +409,7 @@ <h3 id="parsejsonnumber-4">ParseJSONNumber</h3>
</li>
</ul>

<h3 id="parsejsonnumber-5">ParseJSONNumber</h3>
<h3 id="parsejsonnumber-7">ParseJSONNumber</h3>
<pre>public static CBORObject ParseJSONNumber(byte[] bytes, JSONOptions options)
</pre>
<p>Parses a number from a byte sequence whose format follows the JSON
Expand Down Expand Up @@ -342,7 +442,7 @@ <h3 id="parsejsonnumber-5">ParseJSONNumber</h3>
parsing fails, including if the byte sequence is null or empty.</li>
</ul>

<h3 id="parsejsonnumber-6">ParseJSONNumber</h3>
<h3 id="parsejsonnumber-8">ParseJSONNumber</h3>
<pre>public static CBORObject ParseJSONNumber(byte[] bytes, int offset, int count)
</pre>
<p>Parses a number whose format follows the JSON specification (RFC 8259)
Expand Down Expand Up @@ -392,8 +492,8 @@ <h3 id="parsejsonnumber-6">ParseJSONNumber</h3>
</li>
</ul>

<h3 id="parsejsonnumber-7">ParseJSONNumber</h3>
<pre>public static CBORObject ParseJSONNumber(byte[] bytes) Parses a number from a byte sequence whose format follows the JSON specification. The method uses a JSONOptions with all default properties.
<h3 id="parsejsonnumber-9">ParseJSONNumber</h3>
<pre>public static CBORObject ParseJSONNumber(byte[] bytes) Parses a number from a byte sequence whose format follows the JSON specification. The method uses a JSONOptions with all default properties except for a PreserveNegativeZero property of false.
</pre>

<p><strong>Parameters:</strong></p>
Expand All @@ -405,11 +505,13 @@ <h3 id="parsejsonnumber-7">ParseJSONNumber</h3>
<p><strong>Returns:</strong></p>

<ul>
<li>A CBOR object that represents the parsed number. Returns null if the
parsing fails, including if the byte sequence is null or empty.</li>
<li>A CBOR object that represents the parsed number. Returns positive
zero if the number is a zero that starts with a minus sign (such as “-0” or
“-0.0”). Returns null if the parsing fails, including if the byte sequence
is null or empty.</li>
</ul>

<h3 id="parsejsonnumber-8">ParseJSONNumber</h3>
<h3 id="parsejsonnumber-10">ParseJSONNumber</h3>
<pre>public static CBORObject ParseJSONNumber(char[] chars, int offset, int count, JSONOptions options)
</pre>
<p>Parses a number from a sequence of <code>char</code> s whose format follows
Expand Down Expand Up @@ -463,7 +565,7 @@ <h3 id="parsejsonnumber-8">ParseJSONNumber</h3>
</li>
</ul>

<h3 id="parsejsonnumber-9">ParseJSONNumber</h3>
<h3 id="parsejsonnumber-11">ParseJSONNumber</h3>
<pre>public static CBORObject ParseJSONNumber(char[] chars, JSONOptions options)
</pre>
<p>Parses a number from a sequence of <code>char</code> s whose format follows
Expand Down Expand Up @@ -497,7 +599,7 @@ <h3 id="parsejsonnumber-9">ParseJSONNumber</h3>
parsing fails, including if the sequence of <code>char</code> s is null or empty.</li>
</ul>

<h3 id="parsejsonnumber-10">ParseJSONNumber</h3>
<h3 id="parsejsonnumber-12">ParseJSONNumber</h3>
<pre>public static CBORObject ParseJSONNumber(char[] chars, int offset, int count)
</pre>
<p>Parses a number whose format follows the JSON specification (RFC 8259)
Expand Down Expand Up @@ -547,8 +649,8 @@ <h3 id="parsejsonnumber-10">ParseJSONNumber</h3>
</li>
</ul>

<h3 id="parsejsonnumber-11">ParseJSONNumber</h3>
<pre>public static CBORObject ParseJSONNumber(char[] chars) Parses a number from a sequence of &lt;code&gt;char&lt;/code&gt; s whose format follows the JSON specification. The method uses a JSONOptions with all default properties.
<h3 id="parsejsonnumber-13">ParseJSONNumber</h3>
<pre>public static CBORObject ParseJSONNumber(char[] chars) Parses a number from a sequence of &lt;code&gt;char&lt;/code&gt; s whose format follows the JSON specification. The method uses a JSONOptions with all default properties except for a PreserveNegativeZero property of false.
</pre>

<p><strong>Parameters:</strong></p>
Expand All @@ -560,8 +662,10 @@ <h3 id="parsejsonnumber-11">ParseJSONNumber</h3>
<p><strong>Returns:</strong></p>

<ul>
<li>A CBOR object that represents the parsed number. Returns null if the
parsing fails, including if the sequence of <code>char</code> s is null or empty.</li>
<li>A CBOR object that represents the parsed number. Returns positive
zero if the number is a zero that starts with a minus sign (such as “-0” or
“-0.0”). Returns null if the parsing fails, including if the sequence of
<code>char</code> s is null or empty.</li>
</ul>

<p><a href="/CBOR/">Back to CBOR start page.</a></p>
Expand Down
7 changes: 7 additions & 0 deletions CBOR/api/com.upokecenter.cbor.CBORDateConverter.html
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,13 @@ <h3 id="trygetdatetimefields">TryGetDateTimeFields</h3>
otherwise.</li>
</ul>

<p><strong>Throws:</strong></p>

<ul>
<li><code>NullPointerException</code> - The parameter <code>year</code> or <code>
lesserFields</code> is null, or contains fewer elements than required.</li>
</ul>

<h3 id="datetimefieldstocborobject">DateTimeFieldsToCBORObject</h3>
<pre>public CBORObject DateTimeFieldsToCBORObject(int smallYear, int month, int day) Converts a date/time in the form of a year, month, and day to a CBOR object. The hour, minute, and second are treated as 00:00:00 by this method, and the time offset is treated as 0 by this method.
</pre>
Expand Down
Loading

0 comments on commit 2b7e76d

Please sign in to comment.