code: def _coerce_json_to_amendment(self, json_repr):
          
          if isinstance(json_repr, dict):
              amendment = json_repr
          else:
              try:
                  amendment = anyjson.loads(json_repr)
              except:
                  _LOG.warn('> invalid JSON (failed anyjson parsing)')
                  return None
          return amendment
docs: Use to ensure that a JSON string (if found) is parsed to the equivalent dict in python.
          If the incoming value is already parsed, do nothing. If a string fails to parse, return None.