How to use the allensdk.core.json_utilities.write_string function in allensdk

To help you get started, we’ve selected a few allensdk examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github AllenInstitute / mouse_connectivity_models / mcmodels / core / voxel_model_cache.py View on Github external
a string will be returned.

        Returns
        -------
        string
            If file_name == None, a string of the JSON serialization is returned.
        """
        params = dict(resolution=self.resolution,
                      cache=self.cache,
                      manifest_file=self.manifest_file,
                      ccf_version=self.ccf_version,
                      base_uri=self.base_uri,
                      version=self.version)

        if file_name is None:
            return json_utilities.write_string(params)

        json_utilities.write(file_name, params)