def get_sample_stats_json(self,barcode=None):
sample_stats_json_filename = "<STR_LIT>"<EOL>sample_stats_json_id = dxpy.find_one_data_object(more_ok=False,zero_ok=False,project=self.dx_project_id,name=sample_stats_json_filename)["<STR_LIT:id>"]<EOL>json_data = json.loads(dxpy.open_dxfile(sample_stats_json_id).read())<EOL>if not barcode:<EOL><INDENT>return json_data<EOL><DEDENT>for d in json_data: <EOL><INDENT>sample_barcode = d["<STR_LIT>"]<EOL>if sample_barcode == barcode:<EOL><INDENT>return d<EOL><DEDENT><DEDENT>if barcode:<EOL><INDENT>raise DnanexusBarcodeNotFound("<STR_LIT>".format(barcode=barcode,library_name=self.library_name,sample_stats_json_filename=sample_stats_json_filename,project=self.dx_project_id))<EOL><DEDENT>
.. deprecated:: 0.1.0
   GSSC has removed the sample_stats.json file since the entire folder it was in has been 
   removed. Use :meth:`get_barcode_stats` instead. 

Retrieves the JSON object for the stats in the file named sample_stats.json in the project 
specified by self.dx_project_id.  This file is located in the DNAnexus folder stage\d_qc_report.

Args:
    barcode: `str`. The barcode for the sample. Currently, the sample_stats.json file is of the 
        following form when there isn't a genome mapping: 

        [{"Sample name": "AGTTCC"}, {"Sample name": "CAGATC"}, {"Sample name": "GCCAAT"}, ...}]. 

        When there is a mapping, each dictionary has many more keys in addition to the "Sample name" one.

Returns: 
    `list` of dicts if barcode=None, otherwise a dict for the given barcode.