PHP Script to take JSON and make it padded. Some bonus functions too.