dump json instead of pickle to save space