As a follow-up to https://github.com/cpliakas/acquia-sdk-php/pull/17, we should explore adding logic that only calls Acquia\Common\Json::prettyPrint() when the native options are not present. The method is smart enough not to pretty print JSON that is already formatted through the if (strpos($json, $newline)) { condition, however Acquia\Common\Json::encode() could be optimized to eliminate a method call when the native options are present.
As a follow-up to https://github.com/cpliakas/acquia-sdk-php/pull/17, we should explore adding logic that only calls
Acquia\Common\Json::prettyPrint()
when the native options are not present. The method is smart enough not to pretty print JSON that is already formatted through theif (strpos($json, $newline)) {
condition, howeverAcquia\Common\Json::encode()
could be optimized to eliminate a method call when the native options are present.This is more-or-less a micro-optimization.