Use core Json::encode() and Json::decode everywhere possible
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3480683. -->
Reported by: [scott_euser](https://www.drupal.org/user/3267594)
Related to !1019 !434
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>We have a bunch of instances of json_encode and json_decode. Let's just use the ones from core to avoid issues and leave the security of it to core. json_decode does very little. json_encode provides some escaping defaults.</p>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<p>N/A</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>MR</p>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<p>MR</p>
<h3 id="summary-ui-changes">User interface changes</h3>
<p>N/A</p>
<h3 id="summary-api-changes">API changes</h3>
<p>N/A</p>
<h3 id="summary-data-model-changes">Data model changes</h3>
<p>N/A</p>
issue