private void addExperiment(IExperiment experiment)
        {
            bool isOk = (experiment.getParameters() is IParameterList);

            if (isOk)
            {
                this.jwriter.writeStartObject();
                this.jwriter.writePropertyName("experiment_id");
                this.jwriter.writeValue(experiment.getId());
                if (!String.IsNullOrEmpty(experiment.getName()))
                {
                    this.jwriter.writePropertyName("name");
                    this.jwriter.writeValue(experiment.getName());
                }
                if (!String.IsNullOrEmpty(experiment.getDescription()))
                {
                    this.jwriter.writePropertyName("description");
                    this.jwriter.writeValue(experiment.getDescription());
                }
                this.jwriter.writePropertyName("parametercollection");
                this.addParameterCollection((IParameterList)experiment.getParameters());
                this.jwriter.writeEndObject();
            }
            else
            {
                throw new ArgumentException("Property 'experiment.getParameters()' of argument " +
                                            "'experiment' must be of type IParameterList.");
            }
        }