Add json_escape to to_json, fixes issues with &nbsp in price format.

Exemple issue: some currencies requires spacing like "10,00 $ CAD" but you don't want line break so number_to_currency format looks like "10,00%nbsp;$%nbsp;CA".