| 370 | """ |
| 371 | |
| 372 | def __init__(self, *args, **kwargs): |
| 373 | # True if we should use field header which is more future proof approach and also allows |
| 374 | # us to support optional per-field compression, etc. |
| 375 | # This option is only exposed so we can benchmark different approaches and how much overhead |
| 376 | # using a header adds. |
| 377 | self.use_header = kwargs.pop("use_header", False) |
| 378 | self.compression_algorithm = kwargs.pop("compression_algorithm", "none") |
| 379 | |
| 380 | super(JSONDictField, self).__init__(*args, **kwargs) |
| 381 | |
| 382 | def to_mongo(self, value): |
| 383 | if not isinstance(value, dict): |