public interface WriteOptions
Modifier and Type | Interface and Description |
---|---|
static class |
WriteOptions.ShowType |
boolean isPrettyPrint()
boolean isWriteLongsAsStrings()
boolean isSkipNullFields()
boolean isForceMapOutputAsTwoArrays()
boolean isAllowNanAndInfinity()
boolean isEnumPublicFieldsOnly()
boolean isCloseStream()
ClassLoader getClassLoader()
boolean isShortMetaKeys()
String getTypeNameAlias(String typeName)
typeName
- String name of type to fetch alias for. There are no default aliases.boolean isAlwaysShowingType()
boolean isNeverShowingType()
boolean isMinimalShowingType()
boolean isCustomWrittenClass(Class<?> clazz)
clazz
- Class to check to see if there is a custom writer associated to it.boolean isNotCustomWrittenClass(Class<?> clazz)
clazz
- Class to see if it is on the not-customized list. Classes are added to this list when
a class is being picked up through inheritance, and you don't want it to have a custom
writer associated to it.boolean isLongDateFormat()
boolean isNonReferenceableClass(Class<?> clazz)
clazz
- Class to check to see if it is non-referenceable. Non-referenceable classes will always create
a new instance when read in and never use @id/@ref. This uses more memory when the JSON is read in,
as there will be a separate instance in memory for each occurrence. There are certain classes that
json-io automatically treats as non-referenceable, like Strings, Enums, Class, and any Number
instance (BigDecimal, AtomicLong, etc.) You can add to this list. Often, non-referenceable classes
are useful for classes that can be defined in one line as a JSON, like a LocalDateTime, for example.JsonWriter.JsonClassWriter getCustomWriter(Class<?> c)
c
- Class of object for which fetch a custom writervoid clearCaches()
Map<String,Field> getDeepDeclaredFields(Class<?> c)
c
- - given class.Copyright © 2024. All rights reserved.