get json with factory