Reverted isJSON function