finished implementation of PsMatrixJson