Writes the options in JSON format to a file.

        :param str filename: Target file to write the options.

def write_options_to_JSON(self, filename):
        """Writes the options in JSON format to a file.

        :param str filename: Target file to write the options.
        """
        fd = open(filename, "w")
        fd.write(json.dumps(_options_to_dict(self.gc), indent=2,
                            separators=(',', ': ')))
        fd.close()