james fixing json generation