public JsonNode toJson(Object object) {
    // NOTE: jayway json path 2.4.0 seems to have issues with '@.name' so we'll do this manually
    // as determined by a cursory and purely subjective investigation by alex
    // "$..[?(@.name =~ /password$/i || @.name =~ /secret$/i || @.name =~ /secret[\\s_-]*key$/i || @.name =~ /keytab$/i
    //     || @.name =~ /token$/i)]"

    try {
      JsonNode node;
      if (object instanceof JsonNode) {
        node = (JsonNode) object;
      } else if (object instanceof String) {
        node = JsonUtils.stringToJsonNode(String.valueOf(object));
      } else {
        node = JsonUtils.objectToJsonNode(object);
      }
      return toJsonRecursive(node);
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
  }
@Test
  public void testNoop() {
    Object output = new Obfuscator("nope", Collections.emptyList()).toJson(_map);
    Assert.assertEquals(output, JsonUtils.objectToJsonNode(_map));
  }