you could use lib_json:set_attrs for that if you want
set_attrs([{"last_update", TimeStamp} , {"history_size", OldHistorySize+1}]).