Updated obstacle to take in JSON