fix period to_json error