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

(cherry picked from commit 0386b22179f019896c9126b43b5716242debdbef)
(cherry picked from commit b911815d399676816add50e9d8d616790add4c97)