-
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
37 changed files
with
217 additions
and
652 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
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,7 +1,7 @@ | ||
/// JSONPath for Dart | ||
library json_path; | ||
|
||
export 'package:json_path/src/path/filter_not_found.dart'; | ||
export 'package:json_path/src/path/json_path.dart'; | ||
export 'package:json_path/src/path/json_path_match.dart'; | ||
export 'package:json_path/src/path/matching_context.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/matching_context.dart'; |
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,37 @@ | ||
import 'package:json_path/src/json_path_match.dart'; | ||
import 'package:json_path/src/matching_context.dart'; | ||
import 'package:json_path/src/quote.dart'; | ||
import 'package:rfc_6901/rfc_6901.dart'; | ||
|
||
/// Creates a match for a child element | ||
class ChildMatch implements JsonPathMatch { | ||
/// Child match for an array element | ||
ChildMatch.index(int index, this.parent) | ||
: value = parent.value[index], | ||
path = parent.path + '[' + index.toString() + ']', | ||
pointer = JsonPointerSegment(index.toString(), parent.pointer); | ||
|
||
/// Child match for an object child | ||
ChildMatch.child(String key, this.parent) | ||
: value = parent.value[key], | ||
path = parent.path + '[' + quote(key) + ']', | ||
pointer = JsonPointerSegment(key, parent.pointer); | ||
|
||
/// The value | ||
@override | ||
final value; | ||
|
||
/// JSONPath to this match | ||
@override | ||
final String path; | ||
|
||
/// JSON Pointer (RFC 6901) to this match | ||
@override | ||
final JsonPointer pointer; | ||
|
||
@override | ||
MatchingContext get context => parent.context; | ||
|
||
@override | ||
final JsonPathMatch parent; | ||
} |
File renamed without changes.
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
8 changes: 4 additions & 4 deletions
8
lib/src/path/json_path_match.dart → lib/src/json_path_match.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
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 @@ | ||
import 'package:json_path/src/json_path_match.dart'; | ||
|
||
class MatchingContext { | ||
const MatchingContext(this.filters); | ||
|
||
/// Named callback filters | ||
final Map<String, CallbackFilter> filters; | ||
} |
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 was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.