(value, indent=None, sort_keys=False, separators=(",", ": "))
| 45 | |
| 46 | |
| 47 | def to_json_string(value, indent=None, sort_keys=False, separators=(",", ": ")): |
| 48 | value = db_util.mongodb_to_python_types(value) |
| 49 | |
| 50 | options = {} |
| 51 | |
| 52 | if indent is not None: |
| 53 | options["indent"] = indent |
| 54 | |
| 55 | if sort_keys is not None: |
| 56 | options["sort_keys"] = sort_keys |
| 57 | |
| 58 | if separators is not None: |
| 59 | options["separators"] = separators |
| 60 | |
| 61 | return json.dumps(value, **options) |
| 62 | |
| 63 | |
| 64 | def to_yaml_string(value, indent=None, allow_unicode=True): |
nothing calls this directly
no outgoing calls
no test coverage detected