fluent/fluent-plugin-mongo — pull request #30 by ryotarai (2014-01-17 05:52:50+00:00)
Title: Sanitize keys which contain "." or start with "$".

A key containing "." or starting with "$" is invalid as BSON.
Add `replace_dot_in_key_with` and `replace_dollar_in_key_with` params to replace the invalid char.

### Example
Config:
```

type mongo
replace_dot_in_key_with __dot__
replace_dollar_in_key_with __dollar__

```

Input:
```
{"foo.bar": {"$foo$bar": "baz"}}
```

The document will be inserted as the following:
```
{"foo__dot__bar": {"__dollar__foo$bar": "baz"}}
```