Skip to content

Instantly share code, notes, and snippets.

@v6ak
Created March 28, 2011 20:46
Show Gist options
  • Select an option

  • Save v6ak/891235 to your computer and use it in GitHub Desktop.

Select an option

Save v6ak/891235 to your computer and use it in GitHub Desktop.
class FormatsExtension(formats: Formats){
def +(newParameterNameReader: ParameterNameReader) = new Formats{
override val dateFormat = formats.dateFormat
override val parameterNameReader = newParameterNameReader
override val typeHintFieldName = formats.typeHintFieldName
override val fieldSerializers = formats.fieldSerializers
override val customSerializers = formats.customSerializers
override val typeHints = formats.typeHints
}
}
object FormatsExtension{
implicit def convert(formats:Formats) = new FormatsExtension(formats)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment