@Deprecated public class JsonWriter extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
JsonWriter.JsonClassWriter
Deprecated.
|
static interface |
JsonWriter.JsonClassWriterBase
Deprecated.
|
static interface |
JsonWriter.JsonClassWriterEx
Deprecated.
|
Modifier and Type | Field and Description |
---|---|
static String |
CLASSLOADER
Deprecated.
If set, use the specified ClassLoader
|
static String |
CUSTOM_WRITER_MAP
Deprecated.
If set, this maps class ==> CustomWriter
|
static String |
DATE_FORMAT
Deprecated.
Set the date format to use within the JSON output
|
static String |
ENUM_PUBLIC_ONLY
Deprecated.
If set, indicates that private variables of ENUMs are not to be serialized
|
static String |
FIELD_NAME_BLACK_LIST
Deprecated.
Set value to a
Map<Class, List<String>> which will be used to control which fields on a class are not output. |
static String |
FIELD_SPECIFIERS
Deprecated.
Set value to a
Map<Class, List<String>> which will be used to control which fields on a class are output |
static String |
FORCE_MAP_FORMAT_ARRAY_KEYS_ITEMS
Deprecated.
If set to true all maps are transferred to the format @keys[],@items[] regardless of the key_type
|
static String |
ISO_DATE_FORMAT
Deprecated.
Constant for use as DATE_FORMAT value
|
static String |
ISO_DATE_TIME_FORMAT
Deprecated.
Constant for use as DATE_FORMAT value
|
static String |
NOT_CUSTOM_WRITER_MAP
Deprecated.
If set, this maps class ==> CustomWriter
|
static String |
PRETTY_PRINT
Deprecated.
Force nicely formatted JSON output
|
static String |
SHORT_META_KEYS
Deprecated.
If set, then @type -> @t, @keys -> @k, @items -> @i
|
static String |
SKIP_NULL_FIELDS
Deprecated.
If set, null fields are not written
|
static String |
TYPE
Deprecated.
Force @type always
|
static String |
TYPE_NAME_MAP
Deprecated.
If set, this map will be used when writing @type values - allows short-hand abbreviations type names
|
static String |
WRITE_LONGS_AS_STRINGS
Deprecated.
If set, longs are written in quotes (Javascript safe)
|
Constructor and Description |
---|
JsonWriter()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static String |
objectToJson(Object item)
Deprecated.
|
static String |
objectToJson(Object item,
Map<String,Object> optionalArgs)
Deprecated.
|
public static final String CUSTOM_WRITER_MAP
public static final String NOT_CUSTOM_WRITER_MAP
public static final String DATE_FORMAT
public static final String ISO_DATE_FORMAT
public static final String ISO_DATE_TIME_FORMAT
public static final String TYPE
public static final String PRETTY_PRINT
public static final String FIELD_SPECIFIERS
Map<Class, List<String>>
which will be used to control which fields on a class are outputpublic static final String FIELD_NAME_BLACK_LIST
Map<Class, List<String>>
which will be used to control which fields on a class are not output. Black list has always priority to FIELD_SPECIFIERSpublic static final String ENUM_PUBLIC_ONLY
public static final String WRITE_LONGS_AS_STRINGS
public static final String TYPE_NAME_MAP
public static final String SHORT_META_KEYS
public static final String SKIP_NULL_FIELDS
public static final String CLASSLOADER
public static final String FORCE_MAP_FORMAT_ARRAY_KEYS_ITEMS
@Deprecated public static String objectToJson(Object item)
item
- Object (root) to serialized to JSON String.objectToJson(Object, java.util.Map)
@Deprecated public static String objectToJson(Object item, Map<String,Object> optionalArgs)
item
- Object to convert to a JSON String.optionalArgs
- (optional) Map of extra arguments indicating how dates are formatted,
what fields are written out (optional). For Date parameters, use the public static
DATE_TIME key, and then use the ISO_DATE or ISO_DATE_TIME indicators. Or you can specify
your own custom SimpleDateFormat String, or you can associate a SimpleDateFormat object,
in which case it will be used. This setting is for both java.util.Date and java.sql.Date.
If the DATE_FORMAT key is not used, then dates will be formatted as longs. This long can
be turned back into a date by using 'new Date(longValue)'.Copyright © 2024. All rights reserved.