Added JSON endpoints to todo index and show action