-
Methods Method Description com.upokecenter.cbor.CBORDataUtilities.ParseJSONNumber(String, boolean, boolean) Call the one-argument version of this method instead. If this method call used positiveOnly = true, check that the String does not begin with '-' before calling that version. If this method call used integersOnly = true, check that the String does not contain '.', 'E', or 'e' before calling that version.com.upokecenter.cbor.CBORObject.Abs() Instead, convert this object to a number (with .getAsNumber()()), and use that number's.getAbs()() method.com.upokecenter.cbor.CBORObject.Addition(CBORObject, CBORObject) Instead, convert both CBOR objects to numbers (with .AsNumber()), and use the first number's.Add() method.com.upokecenter.cbor.CBORObject.AsByte() Instead, use.getToObject()<byte>() in .NET or .getToObject()(Byte.class) in Java.com.upokecenter.cbor.CBORObject.AsEDecimal() Instead, use.getToObject()<PeterO.Numbers.EDecimal>() in .NET or .getToObject()(com.upokecenter.numbers.EDecimal.class) in Java.com.upokecenter.cbor.CBORObject.AsEFloat() Instead, use.getToObject()<PeterO.Numbers.EFloat>() in.NET or .getToObject()(com.upokecenter.numbers.EFloat.class) in Java.com.upokecenter.cbor.CBORObject.AsEInteger() Instead, use.getToObject()<PeterO.Numbers.EInteger>() in .NET or .getToObject()(com.upokecenter.numbers.EInteger.class) in Java.com.upokecenter.cbor.CBORObject.AsERational() Instead, use.getToObject()<PeterO.Numbers.ERational>() in .NET or.getToObject()(com.upokecenter.numbers.ERational.class) in Java.com.upokecenter.cbor.CBORObject.AsInt16() Instead, use the following: (cbor.AsNumber().ToInt16Checked()), or .getToObject()<short>() in .NET.com.upokecenter.cbor.CBORObject.AsInt64() Instead, use the following: (cbor.AsNumber().ToInt64Checked()), or .ToObject<long>() in.NET.com.upokecenter.cbor.CBORObject.CanFitInDouble() Instead, use the following: (cbor.isNumber() && cbor.AsNumber().CanFitInDouble()).com.upokecenter.cbor.CBORObject.CanFitInInt32() Instead, use.CanValueFitInInt32(), if the application allows only CBOR integers, or (cbor.isNumber() &&cbor.AsNumber().CanFitInInt32()), if the application allows any CBOR Object convertible to an integer.com.upokecenter.cbor.CBORObject.CanFitInInt64() Instead, use CanValueFitInInt64(), if the application allows only CBOR integers, or (cbor.isNumber() &&cbor.AsNumber().CanFitInInt64()), if the application allows any CBOR Object convertible to an integer.com.upokecenter.cbor.CBORObject.CanFitInSingle() Instead, use the following: (cbor.isNumber() && cbor.AsNumber().CanFitInSingle()).com.upokecenter.cbor.CBORObject.CanTruncatedIntFitInInt32() Instead, use the following: (cbor.CanValueFitInInt32() if only integers of any tag are allowed, or (cbor.isNumber() && cbor.AsNumber().CanTruncatedIntFitInInt32()).com.upokecenter.cbor.CBORObject.CanTruncatedIntFitInInt64() Instead, use the following: (cbor.CanValueFitInInt64() if only integers of any tag are allowed, or (cbor.isNumber() && cbor.AsNumber().CanTruncatedIntFitInInt64()).com.upokecenter.cbor.CBORObject.Divide(CBORObject, CBORObject) Instead, convert both CBOR objects to numbers (with .AsNumber()), and use the first number's.Divide() method.com.upokecenter.cbor.CBORObject.FromJSONString(String, CBOREncodeOptions) Instead, use.getFromJSONString()(str, new JSONOptions(\allowduplicatekeys = true\)) or .getFromJSONString()(str, new JSONOptions(\allowduplicatekeys = false\)), as appropriate.com.upokecenter.cbor.CBORObject.isFinite() Instead, use the following: (cbor.isNumber() && cbor.AsNumber().IsFinite()).com.upokecenter.cbor.CBORObject.IsInfinity() Instead, use the following: (cbor.isNumber() && cbor.AsNumber().IsInfinity()).com.upokecenter.cbor.CBORObject.isIntegral() Instead, use the following: (cbor.isNumber() && cbor.AsNumber().IsInteger()).com.upokecenter.cbor.CBORObject.IsNaN() Instead, use the following: (cbor.isNumber() && cbor.AsNumber().IsNaN()).com.upokecenter.cbor.CBORObject.isNegative() Instead, use (cbor.IsNumber() && cbor.AsNumber().IsNegative()).com.upokecenter.cbor.CBORObject.IsNegativeInfinity() Instead, use the following: (cbor.isNumber() && cbor.AsNumber().IsNegativeInfinity()).com.upokecenter.cbor.CBORObject.IsPositiveInfinity() Instead, use the following: (cbor.isNumber() && cbor.AsNumber().IsPositiveInfinity()).com.upokecenter.cbor.CBORObject.isZero() Instead, use the following: (cbor.isNumber() && cbor.AsNumber().IsZero()).com.upokecenter.cbor.CBORObject.Multiply(CBORObject, CBORObject) Instead, convert both CBOR objects to numbers (with .AsNumber()), and use the first number's.Multiply() method.com.upokecenter.cbor.CBORObject.Negate() Instead, convert this object to a number (with .AsNumber()), and use that number's.Negate() method.com.upokecenter.cbor.CBORObject.ReadJSON(InputStream, CBOREncodeOptions) Instead, use.getReadJSON()(stream, new JSONOptions(\allowduplicatekeys = true\)) or .getReadJSON()(stream, new JSONOptions(\allowduplicatekeys = false\)), as appropriate.com.upokecenter.cbor.CBORObject.Remainder(CBORObject, CBORObject) Instead, convert both CBOR objects to numbers (with .AsNumber()), and use the first number's.Remainder() method.com.upokecenter.cbor.CBORObject.signum() Instead, convert this object to a number with.AsNumber(), and use the Sign property in.NET or the signum method in Java. Either will treat not-a-number (NaN) values differently than here.com.upokecenter.cbor.CBORObject.Subtract(CBORObject, CBORObject) Instead, convert both CBOR objects to numbers (with .AsNumber()), and use the first number's.Subtract() method.com.upokecenter.cbor.JSONOptions.getBase64Padding() This property now has no effect. This library now includes necessary padding when writing traditional base64 to JSON and includes no padding when writing base64url to JSON, in accordance with the revision of the CBOR specification.
-
Constructors Constructor Description com.upokecenter.cbor.CBOREncodeOptions(boolean, boolean) Use the more readable String constructor instead.com.upokecenter.cbor.JSONOptions(boolean) Use the more readable String constructor instead.com.upokecenter.cbor.PODOptions(boolean, boolean) Use the more readable String constructor instead.
-
Enum Constants Enum Constant Description com.upokecenter.cbor.CBORType.Number Since version 4.0, CBORObject.Type no longer returns this value for any CBOR Object - this is a breaking change from earlier versions. Instead, use the IsNumber property of CBORObject to determine whether a CBOR Object represents a number, or use the two new CBORType values instead. CBORType.Integer covers CBOR objects representing integers of major type 0 and 1. CBORType.FloatingPoint covers CBOR objects representing 16-, 32-, and 64-bit floating-point numbers. CBORType.Number may be removed in version 5.0 or later.