fix: add toJSON check to JSON.dry (toJSON messes up links)