Serializing Perspective property objects

I’m try to serialize some Perspective property objects so that I can save/load them from a database. I found this post which looks like a good solution for relatively flat objects, but mine has a bit more structure and I’m having a hard time wrapping my head around a good general way to extract the Value properties.

Here’s an example of the data stored in a custom property that I’m trying to serialize:

[
  {
    "axes": [
      {
        "interpolation": "curveBasis",
        "min": 0,
        "max": 100,
        "name": "Default Axis",
        "alignment": "left",
        "type": "line",
        "axisID": 0
      },
      {
        "interpolation": "curveLinear",
        "min": 0,
        "max": 1,
        "name": "On/Off Axis",
        "alignment": "left",
        "type": "area",
        "axisID": 1
      }
    ],
    "name": "Primary Plot",
    "plotID": 0
  },
  {
    "axes": [
      {
        "interpolation": "curveBasis",
        "min": 0,
        "max": 100,
        "name": "Default Axis",
        "alignment": "left",
        "type": "line",
        "axisID": 0
      },
      {
        "interpolation": "curveBasis",
        "min": 0,
        "max": 1,
        "name": "On/Off Axis",
        "alignment": "left",
        "type": "area",
        "axisID": 1
      }
    ],
    "name": "Secondary Plot",
    "plotID": 1
  }
]