@@ -29,6 +29,7 @@ export class JsonException extends BaseException {}
29
29
30
30
/**
31
31
* A character was invalid in this context.
32
+ * @deprecated Deprecated since version 11. Use 3rd party JSON parsers such as `jsonc-parser` instead.
32
33
*/
33
34
export class InvalidJsonCharacterException extends JsonException {
34
35
invalidChar : string ;
@@ -51,6 +52,7 @@ export class InvalidJsonCharacterException extends JsonException {
51
52
52
53
/**
53
54
* More input was expected, but we reached the end of the stream.
55
+ * @deprecated Deprecated since version 11. Use 3rd party JSON parsers such as `jsonc-parser` instead.
54
56
*/
55
57
export class UnexpectedEndOfInputException extends JsonException {
56
58
constructor ( _context : JsonParserContext ) {
@@ -60,6 +62,7 @@ export class UnexpectedEndOfInputException extends JsonException {
60
62
61
63
/**
62
64
* An error happened within a file.
65
+ * @deprecated Deprecated since version 11. Use 3rd party JSON parsers such as `jsonc-parser` instead.
63
66
*/
64
67
export class PathSpecificJsonException extends JsonException {
65
68
constructor ( public path : string , public exception : JsonException ) {
@@ -69,6 +72,7 @@ export class PathSpecificJsonException extends JsonException {
69
72
70
73
/**
71
74
* Context passed around the parser with information about where we currently are in the parse.
75
+ * @deprecated Deprecated since version 11. Use 3rd party JSON parsers such as `jsonc-parser` instead.
72
76
*/
73
77
export interface JsonParserContext {
74
78
position : Position ;
@@ -832,6 +836,8 @@ export enum JsonParseMode {
832
836
* Parse the JSON string and return its AST. The AST may be losing data (end comments are
833
837
* discarded for example, and space characters are not represented in the AST), but all values
834
838
* will have a single node in the AST (a 1-to-1 mapping).
839
+ *
840
+ * @deprecated Deprecated since version 11. Use 3rd party JSON parsers such as `jsonc-parser` instead.
835
841
* @param input The string to use.
836
842
* @param mode The mode to parse the input with. {@see JsonParseMode}.
837
843
* @returns {JsonAstNode } The root node of the value of the AST.
@@ -863,6 +869,7 @@ export function parseJsonAst(input: string, mode = JsonParseMode.Default): JsonA
863
869
864
870
/**
865
871
* Options for the parseJson() function.
872
+ * @deprecated Deprecated since version 11. Use 3rd party JSON parsers such as `jsonc-parser` instead.
866
873
*/
867
874
export interface ParseJsonOptions {
868
875
/**
@@ -879,6 +886,7 @@ export interface ParseJsonOptions {
879
886
* If a path option is pass, it also absorbs JSON parsing errors and return a new error with the
880
887
* path in it. Useful for showing errors when parsing from a file.
881
888
*
889
+ * @deprecated Deprecated since version 11. Use 3rd party JSON parsers such as `jsonc-parser` instead.
882
890
* @param input The string to parse.
883
891
* @param mode The mode to parse the input with. {@see JsonParseMode}.
884
892
* @param options Additional optinos for parsing.
0 commit comments