fun withDateFormat(df: DateFormat?): ObjectWriter? { val newConfig: SerializationConfig = _config.withDateFormat(df) return if (newConfig === _config) { this } else ObjectWriter(this, newConfig) }
Fluent factory method that will construct a new writer instance that will use specified date format for serializing dates ; or if null passed , one that will serialize dates as numeric timestamps .