BZ-1087941 - JSON entities are not un/wrapped in the REST API
(cherry picked from commit 21e36abde5414818dd9d177056366f2f6b9c56cf)