- Type Parameters:
T
- type of the value
- All Known Subinterfaces:
Hson.Array
,Hson.Struct
- Enclosing class:
Hson
A HSON value (may of types of
Hson.Type
).-
Method Summary
Modifier and TypeMethodDescriptiondefault Hson.Array
asArray()
Get this parsed value as an array.default Hson.Struct
asStruct()
Get this parsed value as a struct.type()
Type of this value.value()
Value.void
write
(PrintWriter writer) Write the HSON value.
-
Method Details
-
write
Write the HSON value.- Parameters:
writer
- writer to write to
-
value
T value()Value.- Returns:
- the value
-
type
Hson.Type type()Type of this value.- Returns:
- type of this value
-
asArray
Get this parsed value as an array.- Returns:
- this value as an array
- Throws:
HsonException
- in case this value is not of typeHson.Type.ARRAY
-
asStruct
Get this parsed value as a struct.- Returns:
- this value as a struct
- Throws:
HsonException
- in case this value is not of typeHson.Type.STRUCT
-