JSON.print throws stack overflow error

So I was trying to export the Plots.PyPlot.matplotlib.rcParams dictionary to a JSON file so I could use that configuration in my Python code (since the default plots made by Plots.jl are quite nice looking), so I wrote the following to export it to a JSON file -

using JSON
using Plots

pyplot()
configs = Plots.PyPlot.matplotlib.rcParams

open("rcParams.json", "w") do f
    JSON.print(f, configs)
end

However it throws this StackOverflow error

ERROR: LoadError: StackOverflowError:
in expression starting at /home/cocoa/Documents/DarkMatterProject/JuliaCode/main.jl:7

I’m unsure what the issue is here. It works fine for a test dictionary I made

julia> td = Dict("Hello" => 1, "World" => 2)
Dict{String, Int64} with 2 entries:
  "Hello" => 1
  "World" => 2

julia> JSON.print(td)
{"Hello":1,"World":2}

Perhaps some issue with the dictionary? Here is the full dictionary - Debian paste error

Appreciate your help!