Package dev.sigstore.json.canonicalizer
Class NumberToJSON
java.lang.Object
dev.sigstore.json.canonicalizer.NumberToJSON
An implementation of Ryu for serializing IEEE-754 double precision values for JSON as specified
by ES6
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
serializeNumber
(double value) Formats a number according to ES6.
-
Constructor Details
-
NumberToJSON
public NumberToJSON()
-
-
Method Details
-
serializeNumber
Formats a number according to ES6.This code is emulating 7.1.12.1 of the EcmaScript V6 specification.
- Parameters:
value
- Value to be formatted- Returns:
- String representation
- Throws:
IOException
- NaN/Infinity
-