NMS-6420 more fixes for parsing properly-formatted JSON