write json structured coefficients to file