Package org.webpki.json
Class JSONArrayWriter
java.lang.Object
org.webpki.json.JSONArrayWriter
Writes JSON arrays.
Data types are dealt with as in JSONObjectWriter
.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic JSONArrayWriter
createCoreCertificatePath
(X509Certificate[] certificatePath) byte[]
serializeToBytes
(JSONOutputFormats outputFormat) serializeToString
(JSONOutputFormats outputFormat) setArray()
Create nested array.setArray
(JSONArrayWriter writer) Create nested array.setBigDecimal
(BigDecimal value) setBigInteger
(BigInteger value) setBinary
(byte[] value) setBoolean
(boolean value) setDateTime
(GregorianCalendar dateTime, EnumSet<ISODateTime.DatePatterns> format) setDouble
(double value) setInt
(int value) setInt53
(long value) setLong
(long value) setMoney
(BigDecimal value) setMoney
(BigDecimal value, Integer decimals) setNULL()
setObject
(JSONObjectWriter writer) setSignature
(JSONSigner signer) toString()
-
Constructor Details
-
JSONArrayWriter
public JSONArrayWriter()For creating a JSON array.Note that this constructor can be used for creating a JSON structure where the outermost part in an array as well as for array sub-objects.
- See Also:
-
JSONArrayWriter
-
-
Method Details
-
setString
-
setInt
-
setInt53
-
setLong
-
setMoney
-
setMoney
-
setBigDecimal
-
setBigInteger
-
setDouble
-
setBoolean
-
setNULL
-
setDateTime
public JSONArrayWriter setDateTime(GregorianCalendar dateTime, EnumSet<ISODateTime.DatePatterns> format) -
setBinary
-
setSignature
-
createCoreCertificatePath
-
setArray
Create nested array.This method creates a new array writer at the current position.
- Returns:
- Array writer
-
setArray
Create nested array.This method inserts an existing array writer at the current position.
- Parameters:
writer
- Instance of array writer- Returns:
- Array writer
-
setObject
-
setObject
-
serializeToString
-
serializeToBytes
-
toString
-