Added toJson to history