Update todo_item.rb

Should do the same, but is better maintainable.

Give you the possibility, to define some options, which could be used inside of to_json. The default output would be your previous hardcoded output.