added trait SerialFactory with JsonFactory and AvroFactory implementations