File tree Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Original file line number Diff line number Diff line change 66
77import jmespath
88from jmespath import exceptions
9- from jmespath .compat import OrderedDict
109
1110
1211def 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 ))
You can’t perform that action at this time.
0 commit comments