code: private void writeFields(String objectName, FieldContainer container, FieldType[] fields) throws IOException
     {
        m_writer.writeStartObject(objectName);
        for (FieldType field : fields)
        {
           Object value = container.getCurrentValue(field);
           if (value != null)
           {
              writeField(field, value);
           }
        }
        m_writer.writeEndObject();
     }
docs: Write a set of fields from a field container to a JSON file.
  @param objectName name of the object, or null if no name required
  @param container field container
  @param fields fields to write