title: Getting JSON error: the JSON object must be str, not 'bytes'
body: <p>trying to translate a script from Python 2 to 3 in order to make a script to get wheater indication from narodmon.ru to Domiticz/</p>
  
  <pre><code>#!/usr/bin/env python3.5
  # -*- coding: utf-8 -*-
  import urllib.request, urllib.error, urllib.parse
  import json
  import hashlib
  import uuid
  
  api_key = '********'
  app_id = str(uuid.getnode())
  md5_app_id = hashlib.md5(app_id.encode('utf-8')).hexdigest()
  data = {
      'cmd': 'sensorsNearby',
      'uuid': md5_app_id,
      'api_key': api_key,
      'radius': 11,
      'lat': 55.75,
      'lng': 37.62,
      'lang': 'ru'
      }
  
  try:
      request = urllib.request.Request('http://narodmon.ru/api',json.dumps(data).encode("utf-8"))
      response = urllib.request.urlopen(request)
      result = json.loads(response.read())
      print((json.dumps(result, indent=4, sort_keys=True)))
  except urllib.error.URLError as e:
      print('HTTP error:', e)
  except (ValueError, TypeError) as e:
      print('JSON error:', e)
  </code></pre>
  
  <p>then get an error</p>
  
  <pre><code>JSON error: the JSON object must be str, not 'bytes'
  </code></pre>
  
  <p>Where am I wrong? Thanx a lot</p>