trait Formats extends Serializable

Formats to use when converting JSON. Formats are usually configured by using an implicit parameter:

implicit val formats: Formats = org.json4s.DefaultFormats

Self Type
Formats
Annotations
@implicitNotFound()
Source
Formats.scala
Linear Supertypes
Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Formats
  2. Serializable
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def dateFormat: DateFormat

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. def +[A](newSerializer: FieldSerializer[A]): Formats

    Adds a field serializer for a given type to this formats.

  4. def +(newSerializer: KeySerializer[_]): Formats

    Adds the specified custom key serializer to this formats.

  5. def +(newSerializer: Serializer[_]): Formats

    Adds the specified custom serializer to this formats.

  6. def +(newSerializer: RichSerializer[_]): Formats

    Adds the specified custom serializer to this formats.

  7. def +(extraHints: TypeHints): Formats

    Adds the specified type hints to this formats.

  8. def ++(newSerializers: Iterable[Serializer[_]]): Formats

    Adds the specified custom serializers to this formats.

  9. def -(serializer: Serializer[_]): Formats

    Removes the specified custom serializer from this formats.

  10. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  11. def addKeySerializers(newKeySerializers: Iterable[KeySerializer[_]]): Formats

    Adds the specified custom serializers to this formats.

  12. def alwaysEscapeUnicode: Boolean
  13. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  14. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  15. def companions: List[(Class[_], AnyRef)]
  16. def considerCompanionConstructors: Boolean

    Setting to false preserves library's behavior prior to 3.6, where companion object constructors were only considered when deserializing if there were no primary constructors.

    Setting to false preserves library's behavior prior to 3.6, where companion object constructors were only considered when deserializing if there were no primary constructors. Setting to true preserves the backwards-incompatible change made in 3.6 to always consider companion object constructors when deserializing (https://github.com/json4s/json4s/pull/487).

  17. def customKeySerializers: List[KeySerializer[_]]
  18. def customSerializers: List[Serializer[_]]
  19. def emptyValueStrategy: EmptyValueStrategy
  20. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  22. def extractionNullStrategy: ExtractionNullStrategy
  23. def fieldSerializers: List[(Class[_], FieldSerializer[_])]
  24. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  25. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  26. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  27. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  28. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  29. def nonStrict: Formats
  30. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  31. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  32. def parameterNameReader: reflect.ParameterNameReader

    Parameter name reading strategy.

    Parameter name reading strategy. By default 'paranamer' is used.

  33. def preservingEmptyValues: Formats
  34. def primitives: Set[Type]
  35. def richSerializers: List[RichSerializer[_]]
  36. def skippingEmptyValues: Formats
  37. def strict: Formats
  38. def strictArrayExtraction: Boolean
  39. def strictFieldDeserialization: Boolean
  40. def strictMapExtraction: Boolean
  41. def strictOptionParsing: Boolean
  42. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  43. def toString(): String
    Definition Classes
    AnyRef → Any
  44. def typeHints: TypeHints
  45. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  46. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  47. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  48. def wantsBigDecimal: Boolean
  49. def wantsBigInt: Boolean
  50. def withBigDecimal: Formats
  51. def withBigInt: Formats
  52. def withCompanions(comps: (Class[_], AnyRef)*): Formats
  53. def withDouble: Formats
  54. def withEmptyValueStrategy(strategy: EmptyValueStrategy): Formats
  55. def withEscapeUnicode: Formats
  56. def withExtractionNullStrategy(strategy: ExtractionNullStrategy): Formats
  57. def withLong: Formats
  58. def withPre36DeserializationBehavior: Formats

    Prior to 3.6 companion object constructors were only considered when deserializing if there were no primary constructors.

    Prior to 3.6 companion object constructors were only considered when deserializing if there were no primary constructors. A backwards-incompatible change was made in 3.6 to always consider companion object constructors when deserializing (https://github.com/json4s/json4s/pull/487), and is the default setting (considerCompanionConstructors = true). This changes the setting to false to preserve pre-3.6 deserialization behavior.

  59. def withStrictArrayExtraction: Formats
  60. def withStrictFieldDeserialization: Formats
  61. def withStrictMapExtraction: Formats
  62. def withStrictOptionParsing: Formats

Deprecated Value Members

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. def disallowNull: Formats
    Annotations
    @deprecated
    Deprecated

    (Since version 3.7.0) Use withNullExtractionStrategy instead

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped