MT#7239 enforce boolean context

when updating a JSON::Boolean
(cherry picked from commit 71aa24e791eced7377a92ec8c3e014659999b7d3)