Update to toJson