def field_eq(p, e):
  """
  Checks the field values of a parsed message for equality against
  some ground truth value.

  Parameters
  ----------
  p : object with dict-like attributed access
    Parsed field contents.
  e : object with dict-like attributed access
    Expected field contents.

  Returns
  ----------
  True if fields are equal, else False.

  """
  if isinstance(e, dict):
    return all(field_eq(p[i], j) for (i, j) in iter(e.items()))
  elif isinstance(e, list):
    return all(field_eq(p[i], j) for (i, j) in enumerate(e))
  else:
    return p == e