import json


def text_prepare(string, _null='NULL'):
  """
  Prepare text for db insert
  :param string:
  :param _null:
  :return:
  """
  if string is None:
    return _null
  return json.dumps(string, encoding='utf-8', ensure_ascii=False)