Optimize json size.