def _AddFieldPaths(node, prefix, field_mask):
  if not node:
    field_mask.paths.append(prefix)
    return
  for name in sorted(node):
    if prefix:
      child_path = prefix + '.' + name
    else:
      child_path = name
    _AddFieldPaths(node[name], child_path, field_mask)
Tests that when a JSON snippet is incorrect, an error must be raised.
dataset/ETHPy150Open GoogleCloudPlatform/python-compat-runtime/appengine-compat/exported_appengine_sdk/google/net/proto2/python/internal/well_known_types.py/_AddFieldPaths--crossover with--dataset/ETHPy150Open django-erp/django-erp/djangoerp/core/tests.py/JSONValidationCase.test_incorrect_json_validation