title: How to decode a JSON with Python?
body: <p>I am trying to decode a JSON with Python. Here is a little snippet of what the JSON looks like.</p>
  
  <pre><code>b'{"success":true,"data":[{"id":26,"name":"A","comment":"","start_time_plan":null,"start_time_actual":"2016-09-13 00:00:00","start_time_delta":null,"start_time_score":null,"start_time_score_achievement":null,"start_time_traffic_light":null,"end_time_plan":null,"end_time_actual":"2016-09-13 00:00:00","end_time_delta":null,"end_time_score":null,"end_time_score_achievement":null,"end_time_traffic_light":null,"status":0,"measure_schedule_revision_id":63,"responsible_user_id":3,"created_time":"2016-09-13 11:29:14","created_user_id":3,"modified_time":"2016-09-21 16:33:41","modified_user_id":3,"model":"Activity"},{"id":27,"name":"B","comment":"","start_time_plan":null,"start_time_actual":"2016-09-13 00:00:00","start_time_delta":null,"start_time_score":null,"start_time_score_achievement":null,"start_time_traffic_light":null,"end_time_plan":null,"end_time_actual":"2016-09-13 00:00:00","end_time_delta":null,"end_time_score":null,"end_time_score_achievement":null,"end_time_traffic_light":null,"status":0,"measure_schedule_revision_id":63,"responsible_user_id":3,"created_time":"2016-09-13 11:29:48","created_user_id":3,"modified_time":"2016-10-16 18:14:36","modified_user_id":1,"model":"Activity"}
  </code></pre>
  
  <p>I am trying to get a hold of <code>start_time_delta</code>and <code>end_time_delta</code> and produce a little scatter plot. But somehow I can't decode the JSON. </p>
  
  <p>Here is what I do: </p>
  
  <pre><code>#falcon api
  u = 'https://myurl.com'
  
  #urllib3 + poolmanager for requests
  import urllib3
  http = urllib3.PoolManager()
  
  import json
  r = http.request('GET', u)
  json.loads(r.data.decode('utf-8'))
  
  end = json.loads(r.data['end_time_delta'])
  start = json.loads(r.data['start_time_delta'])
  </code></pre>
  
  <p>This is the error I get:  byte indices must be integers or slices, not str</p>
  
  <p>How come? And how do I solve the problem?</p>