change repy.py to support json