Fix JSON generation for if statements
Remove invalid object syntax