User constructor parsing json value and handling errors.