Package com.bfo.box
Class JsonBox
java.lang.Object
com.bfo.box.Box
com.bfo.box.DataBox
com.bfo.box.JsonBox
A "json" box contains a single JSON object. It is identical to
CborBox
except the value is serialized as JSON. It is defined in ISO19566-5 appendix B.4- Since:
- 5
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
JsonBox
public JsonBox()Create a new uninitialized box, for loading. Don't call this constructor -
JsonBox
Create a new JsonBox- Parameters:
json
- the Json object, which must not be null
-
-
Method Details
-
data
public byte[] data()Description copied from class:DataBox
Return a copy of the byte data from this box. Subclasses should provided more semantically-appropriate methods to retrieve data. -
setJson
Set a new Json object to replace the one in this box- Parameters:
json
- the Json, which must not be null
-
json
Return theJson
object from this Box.- Returns:
- the object
-
toString
Description copied from class:Box
Return a String representation of this Box, which will be parseable as JSON
-