Fix invalid json in viewdefs