validate_A3json: Validate an A3 JSON file without throwing

View source: R/a3.R

validate_A3jsonR Documentation

Validate an A3 JSON file without throwing

Description

Returns every validation issue found in the earliest failing stage, as a data frame. An empty data frame means the document is valid. Use this when you want to present issues in a form or a report; use read_A3json() when you want the object and an error if it cannot be built.

Usage

validate_A3json(filepath)

Arguments

filepath

Character scalar: Path to a JSON file.

Details

Each issue carries a stable code and an RFC 6901 JSON Pointer path, both of which are identical across the R, Python, Julia, TypeScript, and Rust implementations of A3. The message is for humans and is not contractual.

Value

Data frame with columns code, stage, path, and message, with zero rows when the document is valid.

Author(s)

EDG

Examples

a3 <- create_A3("MAEPRQEFEVMEDHAGTYGLGDRK", uniprot_id = "P10636")
tmp <- tempfile(fileext = ".json")
write_A3json(a3, tmp)
validate_A3json(tmp) # zero rows: the document is valid
unlink(tmp)

rtemis.a3 documentation built on Nov. 3, 2026, 1:07 a.m.