Some improvements in the generated JSON