updated string and json utilities to be more consistent