From 21c228d415fe1f3d589b592a96af75015e4de89d Mon Sep 17 00:00:00 2001
From: Matthieu Marcillaud <marcimat@rezo.net>
Date: Thu, 4 Apr 2024 15:18:50 +0200
Subject: [PATCH] docs(upgrade): Indication de suppression de json_export et
 var2js

---
 UPGRADE_5.0.md | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/UPGRADE_5.0.md b/UPGRADE_5.0.md
index fa7ed296be..0c3037beb1 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);
+```
-- 
GitLab