-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
52 changed files
with
940 additions
and
1,154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "cts"] | ||
path = cts | ||
url = https://github.com/jsonpath-standard/jsonpath-compliance-test-suite.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
/// JSONPath for Dart | ||
library json_path; | ||
|
||
export 'package:json_path/json_pointer.dart'; | ||
export 'package:json_path/src/filter_not_found.dart'; | ||
export 'package:json_path/src/json_path.dart'; | ||
export 'package:json_path/src/json_path_match.dart'; | ||
export 'package:json_path/src/predicate.dart'; | ||
export 'package:json_path/src/matching_context.dart'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/// JSON Pointer (RFC 6901). | ||
class JsonPointer { | ||
/// Creates a pointer to the root element | ||
const JsonPointer() : value = ''; | ||
|
||
JsonPointer._(this.value); | ||
|
||
/// The string value of the pointer | ||
final String value; | ||
|
||
/// Returns a new instance of [JsonPointer] | ||
/// with the [segment] appended at the end. | ||
JsonPointer append(String segment) => JsonPointer._( | ||
value + '/' + segment.replaceAll('~', '~0').replaceAll('/', '~1')); | ||
|
||
@override | ||
String toString() => value; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import 'package:json_path/json_pointer.dart'; | ||
import 'package:json_path/src/json_path_match.dart'; | ||
import 'package:json_path/src/matching_context.dart'; | ||
|
||
class AnyMatch<T> implements JsonPathMatch<T> { | ||
const AnyMatch( | ||
{required this.value, | ||
required this.path, | ||
required this.pointer, | ||
required this.context, | ||
this.parent}); | ||
|
||
/// The value | ||
@override | ||
final T value; | ||
|
||
/// JSONPath to this match | ||
@override | ||
final String path; | ||
|
||
/// JSON Pointer (RFC 6901) to this match | ||
@override | ||
final JsonPointer pointer; | ||
|
||
@override | ||
final MatchingContext context; | ||
|
||
@override | ||
final JsonPathMatch? parent; | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import 'package:json_path/src/grammar.dart'; | ||
import 'package:json_path/src/selector/selector.dart'; | ||
import 'package:petitparser/core.dart'; | ||
|
||
Parser<Selector> buildParser() { | ||
return jsonPath; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
class FilterNotFound implements Exception { | ||
FilterNotFound(this.message); | ||
|
||
final String message; | ||
|
||
@override | ||
String toString() => message; | ||
} |
Oops, something went wrong.