code: private void writeDateField(String fieldName, Object value) throws IOException
     {
        if (value instanceof String)
        {
           m_writer.writeNameValuePair(fieldName + "_text", (String) value);
        }
        else
        {
           Date val = (Date) value;
           m_writer.writeNameValuePair(fieldName, val);
        }
     }
docs: Write a date field to the JSON file.
  
  @param fieldName field name
  @param value field value