Temporarily replace all spaces by _ in json document