Add support for str input in decoder