Write results json in a better fashion.