code: private void writeDurationField(String fieldName, Object value) throws IOException
     {
        if (value instanceof String)
        {
           m_writer.writeNameValuePair(fieldName + "_text", (String) value);
        }
        else
        {
           Duration val = (Duration) value;
           if (val.getDuration() != 0)
           {
              Duration minutes = val.convertUnits(TimeUnit.MINUTES, m_projectFile.getProjectProperties());
              long seconds = (long) (minutes.getDuration() * 60.0);
              m_writer.writeNameValuePair(fieldName, seconds);
           }
        }
     }
docs: Write a duration field to the JSON file.
  
  @param fieldName field name
  @param value field value