code: def make_input_from_json_string(sentence_id: SentenceId,
                                  json_string: str,
                                  translator: 'Translator') -> TranslatorInput:
      
      try:
          jobj = json.loads(json_string, encoding=C.JSON_ENCODING)
          return make_input_from_dict(sentence_id, jobj, translator)
  
      except Exception as e:
          logger.exception(e, exc_info=True) if not is_python34() else logger.error(e)  # type: ignore
          return _bad_input(sentence_id, reason=json_string)
docs: Returns a TranslatorInput object from a JSON object, serialized as a string.
  
      :param sentence_id: Sentence id.
      :param json_string: A JSON object serialized as a string that must contain a key "text", mapping to the input text,
             and optionally a key "factors" that maps to a list of strings, each of which representing a factor sequence
             for the input text. Constraints and an avoid list can also be added through the "constraints" and "avoid"
             keys.
      :param translator: A translator object.
      :return: A TranslatorInput.