Easy way to format mathutils.Matrix Vector as tuple (or list) for json?
List comprehension
Can be done with list comprehension to work with any M x N matrix
Example below, as a list of rows and a list of columns.
&gt;&gt;&gt; M = Matrix.Translation((1, 2, 4))

&gt;&gt;&gt; M
Matrix(((1.0, 0.0, 0.0, 1.0),
        (0.0, 1.0, 0.0, 2.0),
        (0.0, 0.0, 1.0, 4.0),
        (0.0, 0.0, 0.0, 1.0)))

&gt;&gt;&gt; [list(row) for row in M]
[[1.0, 0.0, 0.0, 1.0], [0.0, 1.0, 0.0, 2.0], [0.0, 0.0, 1.0, 4.0], [0.0, 0.0, 0.0, 1.0]]

&gt;&gt;&gt; [list(col) for col in M.col]
[[1.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 0.0], [0.0, 0.0, 1.0, 0.0], [1.0, 2.0, 4.0, 1.0]]