Skip to content

Commit a5598bb

Browse files
committed
Expose annotations and error messages for JSON-LD-Star
1 parent df47be2 commit a5598bb

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

lib/ErrorCoded.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,10 @@ export enum ERROR_CODES {
7575
INVALID_BASE_DIRECTION = 'invalid base direction',
7676
RECURSIVE_CONTEXT_INCLUSION = 'recursive context inclusion',
7777
INVALID_STREAMING_KEY_ORDER = 'invalid streaming key order',
78+
79+
/**
80+
* JSON-LD-star
81+
*/
82+
INVALID_EMBEDDED_NODE = "invalid embedded node",
83+
INVALID_ANNOTATION = "invalid annotation",
7884
}

lib/Util.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export class Util {
1919
// All known valid JSON-LD keywords
2020
// @see https://www.w3.org/TR/json-ld11/#keywords
2121
public static readonly VALID_KEYWORDS: {[keyword: string]: boolean} = {
22+
'@annotation': true, // https://json-ld.github.io/json-ld-star/
2223
'@base': true,
2324
'@container': true,
2425
'@context': true,

0 commit comments

Comments
 (0)