added a new way to parse json for the malformed that was plaguing the
rest api earlier, not tested yet