public class JSONInstances extends Object
MISSING_VALUE| Modifier and Type | Field and Description |
|---|---|
static String |
ATTRIBUTES
the attributes object.
|
static String |
CLASS
the class attribute indicator.
|
static String |
DATA
the data section.
|
static String |
DATEFORMAT
the dateformat attribute.
|
static String |
HEADER
the header section.
|
static String |
LABELS
the labels attribute.
|
static String |
MISSING_VALUE
the missing value indicator.
|
static String |
NAME
the name attribute.
|
static String |
RELATION
the relation name.
|
static String |
SPARSE
the sparse attribute.
|
static String |
SPARSE_SEPARATOR
the separator for index/value in case of sparse instances.
|
static String |
TYPE
the type attribute.
|
static String |
VALUES
the values attribute.
|
static String |
WEIGHT
the weight attribute.
|
| Constructor and Description |
|---|
JSONInstances() |
| Modifier and Type | Method and Description |
|---|---|
static void |
main(String[] args)
For testing only.
|
static Instances |
toHeader(JSONNode json)
Turns a JSON object, if possible, into an Instances object (only header).
|
static Instances |
toInstances(JSONNode json)
Turns a JSON object, if possible, into an Instances object.
|
static JSONNode |
toJSON(Instances inst)
Turns the Instances object into a JSON object.
|
public static final String HEADER
public static final String DATA
public static final String RELATION
public static final String ATTRIBUTES
public static final String NAME
public static final String TYPE
public static final String CLASS
public static final String LABELS
public static final String WEIGHT
public static final String DATEFORMAT
public static final String SPARSE
public static final String VALUES
public static final String SPARSE_SEPARATOR
public static final String MISSING_VALUE
public static Instances toInstances(JSONNode json)
json - the JSON object to convertpublic static Instances toHeader(JSONNode json)
json - the JSON object to convertpublic static JSONNode toJSON(Instances inst)
inst - the Instances to turn into a JSON objectCopyright © 2016 University of Waikato, Hamilton, NZ. All Rights Reserved.