Fix preprocess test and way data is handled in json format