remove space and line from json in php code example
Example: remove space and line from json in php
$before = '{ "key": "value with whitespaces to maintain" }';
$after = json_encode(json_decode($before));
$before = '{ "key": "value with whitespaces to maintain" }';
$after = json_encode(json_decode($before));