package com.zyeeda.framework.cxf;

import java.text.SimpleDateFormat;

import org.codehaus.jackson.jaxrs.JacksonJaxbJsonProvider;

import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.map.SerializationConfig;
import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.codehaus.jackson.map.SerializationConfig.Feature;

public class JacksonJsonProvider extends JacksonJaxbJsonProvider {

	public JacksonJsonProvider() {
		ObjectMapper m = this._mapperConfig.getConfiguredMapper();
		if (m == null) {
			m = this._mapperConfig.getDefaultMapper();
		}
		SerializationConfig sc = m.getSerializationConfig().withDateFormat(new SimpleDateFormat("yyyy-MM-dd"));
		sc.setSerializationInclusion(JsonSerialize.Inclusion.NON_NULL);
		sc.set(Feature.FAIL_ON_EMPTY_BEANS, false);
		m.setSerializationConfig(sc);
		/*
		m.getSerializationConfig().setSerializationInclusion(JsonSerialize.Inclusion.NON_NULL);
		m.configure(Feature.FAIL_ON_EMPTY_BEANS, false);
		m.setSerializationConfig(m.getSerializationConfig().withDateFormat(new SimpleDateFormat("yyyy-MM-dd hh:mm:ss")));
		*/
	}
}

@@ -694,14 +694,23 @@
 M-dd
+ hh:mm:ss
 %22));%0D%0A
-
 %09%09sc
@@ -811,32 +811,32 @@
 BEANS, false);%0D%0A
+
 %09%09m.setSerializa
@@ -856,280 +856,8 @@
 );%0D%0A
-%09%09/*%0D%0A%09%09m.getSerializationConfig().setSerializationInclusion(JsonSerialize.Inclusion.NON_NULL);%0D%0A%09%09m.configure(Feature.FAIL_ON_EMPTY_BEANS, false);%0D%0A%09%09m.setSerializationConfig(m.getSerializationConfig().withDateFormat(new SimpleDateFormat(%22yyyy-MM-dd hh:mm:ss%22)));%0D%0A%09%09*/%0D%0A
 %09%7D%0D%0A

change default date format to yyyy-MM-dd hh:mm:ss