diff --git a/UPGRADE_5.0.md b/UPGRADE_5.0.md index fa7ed296be25fa4091d212c08486b8d3b42450db..0c3037beb11be59cb2a048770afed6a6e3cb7fc7 100644 --- a/UPGRADE_5.0.md +++ b/UPGRADE_5.0.md @@ -541,3 +541,22 @@ $html = recuperer_fond('prive/objets/liste/breves', [ 'ajax' => true ]); ``` + +### Fonctions `json_export` et `var2js` + +Les fonctions `json_export` et `var2js`, équivalentes historiques à `json_encode`, sont supprimées. + +#### Avant + +```php +include_spip('inc/json'); +$json = json_export($data); +// ou +$json = var2js($data); +``` + +### Après + +```php +$json = json_encode($data); +```