Hey, I feel your pain! JSON formatting can be a headache. For json dumps without newlines, try this:
```python
import json
data = {"key1": "value1", "key2": "value2"}
compact_json = json.dumps(data, indent=None, separators=(',', ':'))
print(compact_json)
```
If it’s still not working, maybe your environment is adding extra formatting. Try running it in a different editor or terminal.
```python
import json
data = {"key1": "value1", "key2": "value2"}
compact_json = json.dumps(data, indent=None, separators=(',', ':'))
print(compact_json)
```
If it’s still not working, maybe your environment is adding extra formatting. Try running it in a different editor or terminal.
