Package dev.sigstore.json.canonicalizer
Class NumberToJSON
- java.lang.Object
-
- dev.sigstore.json.canonicalizer.NumberToJSON
-
public final class NumberToJSON extends java.lang.ObjectAn implementation of Ryu for serializing IEEE-754 double precision values for JSON as specified by ES6
-
-
Constructor Summary
Constructors Constructor Description NumberToJSON()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringserializeNumber(double value)Formats a number according to ES6.
-
-
-
Method Detail
-
serializeNumber
public static java.lang.String serializeNumber(double value) throws java.io.IOExceptionFormats 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:
java.io.IOException- NaN/Infinity
-
-