@groovy.transform.CompileStatic class JsonFormatter extends BaseJsonFormatter
Format an NCube into an JSON document
Modifiers | Name | Description |
---|---|---|
static java.lang.String |
DEFAULT_COLUMN_PREFIX |
Fields inherited from class | Fields |
---|---|
class BaseJsonFormatter |
dateFormat |
Constructor and description |
---|
JsonFormatter
() |
JsonFormatter
(java.io.OutputStream stream) |
Type Params | Return Type | Name and description |
---|---|---|
|
java.lang.String |
format(NCube ncube, java.util.Map<java.lang.String, java.lang.Object> options = null) Use this API to generate JSON view of this NCube. |
|
void |
formatCube(NCube ncube, java.util.Map<java.lang.String, java.lang.Object> options) |
|
static java.lang.String |
getColumnType(java.lang.Object o) |
|
void |
writeAxes(java.util.List<Axis> axes, java.util.Map<java.lang.String, java.lang.Object> options) |
|
void |
writeAxis(Axis axis, java.util.Map<java.lang.String, java.lang.Object> options) |
|
void |
writeCells(java.util.Map<java.util.Set<java.lang.Long>, java.lang.Object> cells, java.util.Map<java.lang.String, java.lang.Object> options) |
|
void |
writeColumn(Column column, java.util.Map<java.lang.String, java.lang.Object> options) |
|
void |
writeColumns(java.util.List<Column> columns, java.util.Map<java.lang.String, java.lang.Object> options) |
|
void |
writeCommandCell(CommandCell cmd) |
|
void |
writeId(java.lang.Long longId, boolean addComma) |
|
void |
writeIdValue(java.lang.Long longId, boolean addComma) |
|
void |
writeIds(java.util.Set<java.lang.Long> colIds) |
|
void |
writeIndexAxis(Axis axis, java.util.Map<java.lang.String, java.lang.Object> options) |
|
void |
writeType(java.lang.String type) According to parseJsonValue reading in, if your item is one of the following end types it does not need to specify the end type: String, Long, Boolean, Double. |
Methods inherited from class | Name |
---|---|
class BaseJsonFormatter |
append, append, comma, endArray, endObject, startArray, startObject |
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Use this API to generate JSON view of this NCube.
According to parseJsonValue reading in, if your item is one of the following end types it does not need to specify the end type: String, Long, Boolean, Double. These items will all be picked up automatically so to save on those types I don't write out the type.
type
- Type to write, if null don't write anything because its axis default type