Skip to content

Commit c0ca205

Browse files
committed
Update jp.py to not use ordereddict
1 parent 5bf3603 commit c0ca205

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

bin/jp.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,11 @@
66

77
import jmespath
88
from jmespath import exceptions
9-
from jmespath.compat import OrderedDict
109

1110

1211
def main():
1312
parser = argparse.ArgumentParser()
1413
parser.add_argument('expression')
15-
parser.add_argument('-o', '--ordered', action='store_true',
16-
help='Preserve the order of hash keys, which '
17-
'are normally unordered.')
1814
parser.add_argument('-f', '--filename',
1915
help=('The filename containing the input data. '
2016
'If a filename is not given then data is '
@@ -34,10 +30,7 @@ def main():
3430
data = json.load(f)
3531
else:
3632
data = sys.stdin.read()
37-
if args.ordered:
38-
data = json.loads(data, object_pairs_hook=OrderedDict)
39-
else:
40-
data = json.loads(data)
33+
data = json.loads(data)
4134
try:
4235
sys.stdout.write(json.dumps(
4336
jmespath.search(expression, data), indent=4))

0 commit comments

Comments
 (0)