Fix json encode/decode to pickle