@@ -117,9 +117,6 @@ Instead, convert both CBOR objects to numbers (with .AsNumber()), and
117117 use the first number's.Add() method.
118118 Instead, convert both CBOR objects to numbers (with .AsNumber()), and
119119 use the first number's.Add() method.
120- * ` CBORObject ApplyJSONPatch(CBORObject patch) ` <br >
121- Returns a copy of this object after applying the operations in a JSON patch,
122- in the form of a CBOR object.
123120* ` boolean AsBoolean() ` <br >
124121 Returns false if this object is a CBOR false, null, or undefined value
125122 (whether or not the object has tags); otherwise, true.
@@ -202,12 +199,6 @@ Instead, use the following: (cbor.AsNumber().ToInt64Checked()), or
202199 Converts this object to a 32-bit floating point number.
203200* ` java.lang.String AsString() ` <br >
204201 Gets the value of this object as a text string.
205- * ` CBORObject AtJSONPointer(java.lang.String pointer) ` <br >
206- Gets the CBOR object referred to by a JSON Pointer according to RFC6901.
207- * `CBORObject AtJSONPointer(java.lang.String pointer,
208- CBORObject defaultValue)`<br >
209- Gets the CBOR object referred to by a JSON Pointer according to RFC6901, or
210- a default value if the operation fails.
211202* ` long CalcEncodedSize() EncodeToBytes() ` <br >
212203 Calculates the number of bytes this CBOR object takes when serialized as a
213204 byte array using the EncodeToBytes() method.
@@ -1127,9 +1118,7 @@ Gets the value of a CBOR object by integer index in this array or by integer
11271118
11281119* The CBOR object referred to by index or key in this array or map. If
11291120 this is a CBOR map, returns <code >null</code > (not <code >
1130- CBORObject.Null</code >) if an item with the given key doesn't exist (but
1131- this behavior may change to throwing an exception in version 5.0 or
1132- later).
1121+ CBORObject.Null</code >) if an item with the given key doesn't exist.
11331122
11341123** Throws:**
11351124
@@ -2980,10 +2969,7 @@ Generates a CBOR object from a data stream in JavaScript object Notation
29802969 UTF-16, or UTF-32 encoding; the encoding is detected by assuming
29812970 that the first character read must be a byte-order mark or a nonzero
29822971 basic character (U+0001 to U+007F). (In previous versions, only
2983- UTF-8 was allowed.). (This behavior may change to supporting only
2984- UTF-8, with or without a byte order mark, in version 5.0 or later,
2985- perhaps with an option to restore the previous behavior of also
2986- supporting UTF-16 and UTF-32.).
2972+ UTF-8 was allowed.).
29872973
29882974** Parameters:**
29892975
@@ -3111,10 +3097,7 @@ Generates a CBOR object from a data stream in JavaScript object Notation
31113097 UTF-32 encoding; the encoding is detected by assuming that the first
31123098 character read must be a byte-order mark or a nonzero basic
31133099 character (U+0001 to U+007F). (In previous versions, only UTF-8 was
3114- allowed.). (This behavior may change to supporting only UTF-8, with
3115- or without a byte order mark, in version 5.0 or later, perhaps with
3116- an option to restore the previous behavior of also supporting UTF-16
3117- and UTF-32.).
3100+ allowed.).
31183101
31193102** Parameters:**
31203103
@@ -3156,10 +3139,7 @@ Generates a CBOR object from a data stream in JavaScript object Notation
31563139 begin with a byte-order mark (U+FEFF). The byte array can be in
31573140 UTF-8, UTF-16, or UTF-32 encoding; the encoding is detected by
31583141 assuming that the first character read must be a byte-order mark or
3159- a nonzero basic character (U+0001 to U+007F). (This behavior may
3160- change to supporting only UTF-8, with or without a byte order mark,
3161- in version 5.0 or later, perhaps with an option to restore the
3162- previous behavior of also supporting UTF-16 and UTF-32.).
3142+ a nonzero basic character (U+0001 to U+007F).
31633143
31643144** Returns:**
31653145
@@ -3189,10 +3169,7 @@ Generates a CBOR object from a byte array in JavaScript object Notation
31893169 begin with a byte-order mark (U+FEFF). The byte array can be in
31903170 UTF-8, UTF-16, or UTF-32 encoding; the encoding is detected by
31913171 assuming that the first character read must be a byte-order mark or
3192- a nonzero basic character (U+0001 to U+007F). (This behavior may
3193- change to supporting only UTF-8, with or without a byte order mark,
3194- in version 5.0 or later, perhaps with an option to restore the
3195- previous behavior of also supporting UTF-16 and UTF-32.).
3172+ a nonzero basic character (U+0001 to U+007F).
31963173
31973174* <code >jsonoptions</code > - Specifies options to control how the JSON data is decoded
31983175 to CBOR. See the JSONOptions class.
@@ -3228,10 +3205,7 @@ Generates a CBOR object from a byte array in JavaScript object Notation
32283205 byte-order mark (U+FEFF). The portion can be in UTF-8, UTF-16, or
32293206 UTF-32 encoding; the encoding is detected by assuming that the first
32303207 character read must be a byte-order mark or a nonzero basic
3231- character (U+0001 to U+007F). (This behavior may change to
3232- supporting only UTF-8, with or without a byte order mark, in version
3233- 5.0 or later, perhaps with an option to restore the previous
3234- behavior of also supporting UTF-16 and UTF-32.).
3208+ character (U+0001 to U+007F).
32353209
32363210* <code >offset</code > - An index, starting at 0, showing where the desired portion of
32373211 <code >bytes</code > begins.
@@ -3272,10 +3246,7 @@ Generates a CBOR object from a byte array in JavaScript object Notation
32723246 byte-order mark (U+FEFF). The portion can be in UTF-8, UTF-16, or
32733247 UTF-32 encoding; the encoding is detected by assuming that the first
32743248 character read must be a byte-order mark or a nonzero basic
3275- character (U+0001 to U+007F). (This behavior may change to
3276- supporting only UTF-8, with or without a byte order mark, in version
3277- 5.0 or later, perhaps with an option to restore the previous
3278- behavior of also supporting UTF-16 and UTF-32.).
3249+ character (U+0001 to U+007F).
32793250
32803251* <code >offset</code > - An index, starting at 0, showing where the desired portion of
32813252 <code >bytes</code > begins.
@@ -4360,99 +4331,6 @@ Writes the binary representation of this CBOR object and returns a byte
43604331
43614332* <code >java.lang.NullPointerException</code > - The parameter <code >options</code > is null.
43624333
4363- ### AtJSONPointer
4364- public CBORObject AtJSONPointer(java.lang.String pointer)
4365- Gets the CBOR object referred to by a JSON Pointer according to RFC6901. For
4366- more information, see the overload taking a default value parameter.
4367-
4368- ** Parameters:**
4369-
4370- * <code >pointer</code > - A JSON pointer according to RFC 6901.
4371-
4372- ** Returns:**
4373-
4374- * An object within this CBOR object. Returns this object if pointer is
4375- the empty string (even if this object has a CBOR type other than
4376- array or map).
4377-
4378- ** Throws:**
4379-
4380- * <code >CBORException</code > - Thrown if the pointer is null, or
4381- if the pointer is invalid, or if there is no object at the given
4382- pointer, or the special key "-" appears in the pointer, or if the
4383- pointer is non-empty and this object has a CBOR type other than
4384- array or map.
4385-
4386- ### AtJSONPointer
4387- public CBORObject AtJSONPointer(java.lang.String pointer, CBORObject defaultValue)
4388- Gets the CBOR object referred to by a JSON Pointer according to RFC6901, or
4389- a default value if the operation fails. The syntax for a JSON
4390- Pointer is: <pre >'/' KEY '/' KEY.get(...)</pre > where KEY represents
4391- a key into the JSON object or its sub-objects in the hierarchy. For
4392- example, <pre >/foo/2/bar</pre > means the same as
4393- <pre >obj.get('foo')[2]['bar']</pre > in JavaScript. If "~" and/or "/"
4394- occurs in a key, it must be escaped with "~ 0" or "~ 1", respectively,
4395- in a JSON pointer. JSON pointers also support the special key "-"
4396- (as in "/foo/-") to indicate the end of an array, but this method
4397- treats this key as an error since it refers to a nonexistent item.
4398- Indices to arrays (such as 2 in the example) must contain only basic
4399- digits 0 to 9 and no leading zeros. (Note that RFC 6901 was
4400- published before JSON was extended to support top-level values other
4401- than arrays and key-value dictionaries.).
4402-
4403- ** Parameters:**
4404-
4405- * <code >pointer</code > - A JSON pointer according to RFC 6901.
4406-
4407- * <code >defaultValue</code > - The parameter <code >defaultValue</code > is a Cbor.CBORObject
4408- object.
4409-
4410- ** Returns:**
4411-
4412- * An object within the specified JSON object. Returns this object if
4413- pointer is the empty string (even if this object has a CBOR type
4414- other than array or map). Returns <code >defaultValue</code > if the
4415- pointer is null, or if the pointer is invalid, or if there is no
4416- object at the given pointer, or the special key "-" appears in the
4417- pointer, or if the pointer is non-empty and this object has a CBOR
4418- type other than array or map.
4419-
4420- ### ApplyJSONPatch
4421- public CBORObject ApplyJSONPatch(CBORObject patch)
4422- Returns a copy of this object after applying the operations in a JSON patch,
4423- in the form of a CBOR object. JSON patches are specified in RFC 6902
4424- and their format is summarized in the remarks below.<p ><b >Remarks:</b >
4425- A JSON patch is an array with one or more maps. Each map has the
4426- following keys: </p ><ul > <li >"op" - Required. This key's value is the
4427- patch operation and must be "add", "remove", "move", "copy", "test",
4428- or "replace", in basic lower case letters and no other case
4429- combination.</li > <li >"value" - Required if the operation is "add",
4430- "replace", or "test" and specifies the item to add (insert), or that
4431- will replace the existing item, or to check an existing item for
4432- equality, respectively. (For "test", the operation fails if the
4433- existing item doesn't match the specified value.)</li > <li >"path" -
4434- Required for all operations. A JSON Pointer (RFC 6901) specifying the
4435- destination path in the CBOR object for the operation. For more
4436- information, see RFC 6901 or the documentation for
4437- AtJSONPointer(pointer, defaultValue).</li > <li >"from" - Required if
4438- the operation is "move" or "copy". A JSON Pointer (RFC 6901)
4439- specifying the path in the CBOR object where the source value is
4440- located.</li ></ul >
4441-
4442- ** Parameters:**
4443-
4444- * <code >patch</code > - A JSON patch in the form of a CBOR object; it has the form
4445- summarized in the remarks.
4446-
4447- ** Returns:**
4448-
4449- * The result of the patch operation.
4450-
4451- ** Throws:**
4452-
4453- * <code >CBORException</code > - The parameter <code >patch</code > is
4454- null or the patch operation failed.
4455-
44564334### equals
44574335 public boolean equals(java.lang.Object obj)
44584336Determines whether this object and another object are equal and have the
0 commit comments