Added an option to get json from a string