How to Write JSON to a File With Python

Here’s how to write JSON to a file with Python:

import json

data = {
    "key1": "value1",
    "key2": "value2",
    "key3": "value3",
}

formatted_data = json.dumps(data, indent=4)

with open("./data.json", "w") as f:
    f.write(formatted_data)

# Notes
# "indent=4" is optional, but formats the data nicely.
# "w" is a file mode that opens the file for writing only.

The Moon

There was a “blood moon” eclipse tonight. I’ve never tried photographing the moon before – mostly because I didn’t own a telephoto lens until recently. The photo below was captured at 840mm (1260mm FF-equivalent). It’s crazy to think this giant rock is just chilling up there.

Shonan Sunset

One perk of living in Shonan is being able to see sunsets like this one.

Enoshima Sunset

Enoshima is always crowded on the weekends, but at least the sunsets are pretty. Joking aside, it was nice to stop by before the end of the summer. There were a bunch of restaurants and bars on the beach, and it was great to see people socializing and having fun again.

The Leica M10 Monochrom is Mindblowingly Good

I’ve owned many cameras over the years.

To name a few:

  1. Fujifilm X-Pro1
  2. Fujifilm X-Pro2
  3. Fujifilm X-Pro3
  4. Fujifilm X100S
  5. Fujifilm X100T
  6. Leica M10-R
  7. Leica M10 Monochrom

The Leica M10 Monochrom is the only camera that’s ever truly exceeded expectations. Don’t get me wrong, all of the cameras I’ve owned were fantastic, but they all fell within the realm of my expectations.

A black and white shot of vending machines in Japan.

The M10 Monochrom is different. It sees in the dark, and it’s just mindblowingly good. When shooting with my color cameras, I rarely ventured beyond ISO 6400, which seems to be most people’s “point of no return”. With the M10 Monochrom, I routinely shoot between ISO 16,000-25,000 and still get VERY usable images, which is just absurd.

I shot the image below a few nights ago – ISO 16,000, +1.5 stops in Lightroom, and no noise reduction.

Walking down a street somewhere in Shonan.

I only picked up the M10 Monochrom a month ago. Now that I’m back in Japan, I’m looking forward to shooting more with this incredible camera. Hopefully I can sneak up to Tokyo for a weekend stay and some late-night shooting in the next few weeks.