[autotest] Use |json| instead of |simplejson|.

simplejson was moved into the library as of python 2.4. We're now at
python 2.6/2.7, and having to keep installing simplejson everywhere has
slowly turned into a hassle.  Since we can just trivially drop/rename
it, let's do so.

The rpc_interface parts of this change have been vetted, the rest is
done just as a s/simplejson/json/ across the code, which afaik should be
a safe thing to do.

BUG=None
TEST=unit, run_suite
DEPLOY=apache

Change-Id: Iab35f71157e7e5cd3be5291c776b07eb3283be8e
Reviewed-on: https://gerrit.chromium.org/gerrit/46424
Tested-by: Aviv Keshet <akeshet@chromium.org>
Reviewed-by: Alex Miller <milleral@chromium.org>
Commit-Queue: Aviv Keshet <akeshet@chromium.org>
diff --git a/frontend/perf-dashboard/generate_perf_graphs.py b/frontend/perf-dashboard/generate_perf_graphs.py
index 44c09ae..d299a8c 100644
--- a/frontend/perf-dashboard/generate_perf_graphs.py
+++ b/frontend/perf-dashboard/generate_perf_graphs.py
@@ -28,7 +28,7 @@
 import os
 import re
 import shutil
-import simplejson
+import json
 import sys
 import urllib
 import urllib2
@@ -315,7 +315,7 @@
         }
         if units:
             new_dash_entry['units'] = units
-        json_string = simplejson.dumps([new_dash_entry], indent=2)
+        json_string = json.dumps([new_dash_entry], indent=2)
         params = urllib.urlencode({'data': json_string})
         fp = None
         try:
@@ -411,7 +411,7 @@
               'important': False,
             }]
             with open(os.path.join(output_path, 'graphs.dat'), 'w') as f:
-                f.write(simplejson.dumps(graphs, indent=2))
+                f.write(json.dumps(graphs, indent=2))
 
             # Add symlinks to the plotting code.
             for slink, target in _SYMLINK_LIST:
@@ -468,7 +468,7 @@
                 # Output data point to be displayed on the current (deprecated)
                 # dashboard.
                 with open(summary_file, 'a') as f:
-                    f.write(simplejson.dumps(entry) + '\n')
+                    f.write(json.dumps(entry) + '\n')
 
 
 def process_perf_data_files(file_names, test_name, master_name, completed_ids,
@@ -505,7 +505,7 @@
     for file_name in file_names:
         with open(file_name, 'r') as fp:
             for line in fp.readlines():
-                info = simplejson.loads(line.strip())
+                info = json.loads(line.strip())
                 job_id = info[0]
                 job_name = info[1]
                 platform = info[2]
@@ -559,7 +559,7 @@
     @param output_data_dir: A directory in which to output data files.
 
     """
-    charts = simplejson.loads(open(_CHART_CONFIG_FILE, 'r').read())
+    charts = json.loads(open(_CHART_CONFIG_FILE, 'r').read())
 
     # Identify all the job IDs already processed in the graphs, so that we don't
     # add that data again.
@@ -577,7 +577,7 @@
     rev_num_file = os.path.join(output_data_dir, _REV_NUM_FILE_NAME)
     if os.path.exists(rev_num_file):
         with open(rev_num_file, 'r') as fp:
-            summary_id_to_rev_num = simplejson.loads(fp.read())
+            summary_id_to_rev_num = json.loads(fp.read())
 
     # TODO (dennisjeffrey): If we have to add another "test_name_to_X"
     # dictionary to the list below, we should simplify this code to create a
@@ -635,7 +635,7 @@
     # Store the latest revision numbers for each test/platform/release
     # combination, to be used on the next invocation of this script.
     with open(rev_num_file, 'w') as fp:
-        fp.write(simplejson.dumps(summary_id_to_rev_num, indent=2))
+        fp.write(json.dumps(summary_id_to_rev_num, indent=2))
 
     logging.info('Added info for %d new jobs to the graphs!', newly_added_count)