trait Formats extends Serializable
Formats to use when converting JSON. Formats are usually configured by using an implicit parameter:
implicit val formats = org.json4s.DefaultFormats
- Self Type
- Formats
- Annotations
- @implicitNotFound( ... )
- Source
- Formats.scala
- Alphabetic
- By Inheritance
- Formats
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
- abstract def dateFormat: DateFormat
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
+[A](newSerializer: FieldSerializer[A]): Formats
Adds a field serializer for a given type to this formats.
-
def
+(newSerializer: KeySerializer[_]): Formats
Adds the specified custom key serializer to this formats.
-
def
+(newSerializer: Serializer[_]): Formats
Adds the specified custom serializer to this formats.
-
def
+(extraHints: TypeHints): Formats
Adds the specified type hints to this formats.
-
def
++(newSerializers: Iterable[Serializer[_]]): Formats
Adds the specified custom serializers to this formats.
-
def
-(serializer: Serializer[_]): Formats
Removes the specified custom serializer from this formats.
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
addKeySerializers(newKeySerializers: Iterable[KeySerializer[_]]): Formats
Adds the specified custom serializers to this formats.
- def allowNull: Boolean
- def alwaysEscapeUnicode: Boolean
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- def companions: List[(Class[_], AnyRef)]
- def customKeySerializers: List[KeySerializer[_]]
- def customSerializers: List[Serializer[_]]
- def disallowNull: Formats
- def emptyValueStrategy: EmptyValueStrategy
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def fieldSerializers: List[(Class[_], FieldSerializer[_])]
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def nonStrict: Formats
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
parameterNameReader: reflect.ParameterNameReader
Parameter name reading strategy.
Parameter name reading strategy. By default 'paranamer' is used.
- def preservingEmptyValues: Formats
- def primitives: Set[Type]
- def skippingEmptyValues: Formats
- def strict: Formats
- def strictArrayExtraction: Boolean
- def strictOptionParsing: Boolean
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
typeHintFieldName: String
The name of the field in JSON where type hints are added (jsonClass by default)
- def typeHints: TypeHints
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- def wantsBigDecimal: Boolean
- def wantsBigInt: Boolean
- def withBigDecimal: Formats
- def withBigInt: Formats
- def withCompanions(comps: (Class[_], AnyRef)*): Formats
- def withDouble: Formats
- def withEmptyValueStrategy(strategy: EmptyValueStrategy): Formats
- def withEscapeUnicode: Formats
- def withLong: Formats
- def withStrictArrayExtraction: Formats
- def withStrictOptionParsing: Formats
- def withTypeHintFieldName(name: String): Formats
Deprecated Value Members
-
def
customDeserializer(implicit format: Formats): PartialFunction[(TypeInfo, JValue), Any]
- Annotations
- @deprecated
- Deprecated
(Since version 3.6.4) Use the internal methods in the companion object instead.
-
def
customKeyDeserializer(implicit format: Formats): PartialFunction[(TypeInfo, String), Any]
- Annotations
- @deprecated
- Deprecated
(Since version 3.6.4) Use the internal methods in the companion object instead.
-
def
customKeySerializer(implicit format: Formats): PartialFunction[Any, String]
- Annotations
- @deprecated
- Deprecated
(Since version 3.6.4) Use the internal methods in the companion object instead.
-
def
customSerializer(implicit format: Formats): PartialFunction[Any, JValue]
- Annotations
- @deprecated
- Deprecated
(Since version 3.6.4) Use the internal methods in the companion object instead.