MT#10355 Fix forcing boolean context for JSON::bool

(cherry picked from commit 0386b22179f019896c9126b43b5716242debdbef)
(cherry picked from commit 9802e78eac55d976b629d7f5e8ed954590812c2f)