class ZonedDateTimeSerializer extends StdSerializer<ZonedDateTime> {

    @Override
    public void serialize( ZonedDateTime zonedDateTime, JsonGenerator jsonGenerator, SerializerProvider serializerProvider ) throws IOException
    {
        if ( zonedDateTime == null )
        {
            jsonGenerator.writeNull();
        }
        else
        {
            jsonGenerator.writeString( zonedDateTime.format( DateTimeFormatter.ISO_OFFSET_DATE_TIME ) );
        }
    }

    public  ZonedDateTimeSerializer();

}