code: def _deep_json_to_string(value, depth):
      
      if is_data(value):
          if depth == 0:
              return strings.limit(value2json(value), LOG_STRING_LENGTH)
  
          return {k: _deep_json_to_string(v, depth - 1) for k, v in value.items()}
      elif is_sequence(value):
          return strings.limit(value2json(value), LOG_STRING_LENGTH)
      elif isinstance(value, number_types):
          return value
      elif is_text(value):
          return strings.limit(value, LOG_STRING_LENGTH)
      elif is_binary(value):
          return strings.limit(bytes2base64(value), LOG_STRING_LENGTH)
      elif isinstance(value, (date, datetime)):
          return datetime2unix(value)
      else:
          return strings.limit(value2json(value), LOG_STRING_LENGTH)
docs: :param value: SOME STRUCTURE
      :param depth: THE MAX DEPTH OF PROPERTIES, DEEPER WILL BE STRING-IFIED
      :return: FLATTER STRUCTURE