code: def shell2json(s):
      
      replace = {
          r'BinData\(.+?\)': '1',
          r'(new )?Date\(.+?\)': '1',
          r'Timestamp\(.+?\)': '1',
          r'ObjectId\(.+?\)': '1',
          r'DBRef\(.+?\)': '1',
          r'undefined': '1',
          r'MinKey': '1',
          r'MaxKey': '1',
          r'NumberLong\(.+?\)': '1',
          r'/.+?/\w*': '1'
      }
  
      for key, value in replace.items():
          s = re.sub(key, value, s)
  
      return s
docs: Convert shell syntax to json.