def _decode_embedded_list(src):
 output = []
 for elem in src:
  if isinstance(elem, dict):
   elem = _decode_embedded_dict(elem)
  elif isinstance(elem, list):
   elem = _decode_embedded_list(elem)
  elif isinstance(elem, bytes):
   try:
    elem = elem.decode()
   except UnicodeError:
    pass
  output.append(elem)
 return output

def _decode_embedded_list ( src ) : output = [ ] for elem in src : if isinstance ( elem , dict ) : elem = _decode_embedded_dict ( elem ) elif isinstance ( elem , list ) : elem = _decode_embedded_list ( elem ) elif isinstance ( elem , bytes ) : try : elem = elem . decode ( ) except UnicodeError : pass output . append ( elem ) return output
convert enbedded bytes to strings if possible .