code: @Override public void write(ProjectFile projectFile, OutputStream stream) throws IOException
     {
        try
        {
           m_projectFile = projectFile;
           m_writer = new JsonStreamWriter(stream, m_encoding);
           m_writer.setPretty(m_pretty);
  
           m_writer.writeStartObject(null);
           writeCustomFields();
           writeProperties();
           writeResources();
           writeTasks();
           writeAssignments();
           m_writer.writeEndObject();
  
           m_writer.flush();
        }
  
        finally
        {
           m_projectFile = null;
        }
     }
docs: {@inheritDoc}