Json submit

@pld Sorry for the late reply, was away for a week. `error` and `success` work for us, thanks for the change.