Skip to main content
Skip table of contents

setPathType

Versionshinweise

25.5

Code

GROOVY
JsonSchemaConfig setPathType(JsonSchemaConfig config, String pathType)

Beschreibung

Definiert, in welcher Notation Fehlerorte beschrieben werden: entweder "JSON_PATH" (z.B. "$[1].productName") oder "JSON_POINTER" (z.B. "/0/productId")

Parameter

  • config - Die Konfiguration für die Validierung.

  • pathType - JSON_PATH (Standard) oder JSON_POINTER

Rückgabe

Die modifizierte Konfiguration.

Beispiele

GROOVY
JsonSchemaConfig config = JsonSchemaUtils.createValidationConfig();
config = JsonSchemaUtils.setPathType(config, "JSON_POINTER");

JsonSchemaValidation validation = JsonSchemaUtils.validate(config, schema, json);
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.