A dict parser which allows users define their own type and parser function