def valueOfLength (size):
  """Returns a valid JSON value for name update of the given length in bytes."""
  prefix = '{"text": "'
  suffix = '"}'
  overhead = len (prefix) + len (suffix)
  assert size > overhead
  result = prefix + 'x' * (size - overhead) + suffix
  assert len (result) == size
  return result