From 4097346b1d708419ee773c226b4299d000e4e41d Mon Sep 17 00:00:00 2001 From: Christoph Knittel Date: Sun, 23 Feb 2025 11:23:54 +0100 Subject: [PATCH] Deprecate JSON.Classify.classify --- CHANGELOG.md | 4 ++++ runtime/Stdlib_JSON.res | 1 + runtime/Stdlib_JSON.resi | 1 + 3 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cd9cd23e47..f3538dfce7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,10 @@ - Clean up legacy tags handling. https://github.com/rescript-lang/rescript/pull/7309 +#### :nail_care: Polish + +- Deprecate JSON.Classify.classify. https://github.com/rescript-lang/rescript/pull/7315 + # 12.0.0-alpha.9 #### :boom: Breaking Change diff --git a/runtime/Stdlib_JSON.res b/runtime/Stdlib_JSON.res index 380f15e499..698b16fcf5 100644 --- a/runtime/Stdlib_JSON.res +++ b/runtime/Stdlib_JSON.res @@ -57,6 +57,7 @@ module Classify = { | Object(dict) | Array(array) + @deprecated("Directly switch on the JSON object instead") let classify = value => { switch _internalClass(value) { | "[object Boolean]" => Bool(_asBool(value)) diff --git a/runtime/Stdlib_JSON.resi b/runtime/Stdlib_JSON.resi index 096a389709..991d086384 100644 --- a/runtime/Stdlib_JSON.resi +++ b/runtime/Stdlib_JSON.resi @@ -630,6 +630,7 @@ module Classify: { // Number(42) ``` */ + @deprecated("Directly switch on the JSON object instead") let classify: 'a => t }