def convert_behave_to_cucumber_json(behave_filename, cucumber_filename, encoding='UTF-8', pretty=True):
 dump_kwargs = {'encoding': encoding}
 if pretty:
  dump_kwargs.update(indent=2, sort_keys=True)
 with open(behave_filename, 'r') as behave_json:
  with open(cucumber_filename, 'w+') as output_file:
   cucumber_json = b2c.convert(json.load(behave_json, encoding))
   json.dump(cucumber_json, output_file, **dump_kwargs)
 return 0

def convert_behave_to_cucumber_json ( behave_filename , cucumber_filename , encoding = 'UTF-8' , pretty = True ) : dump_kwargs = { 'encoding' : encoding } if pretty : dump_kwargs . update ( indent = 2 , sort_keys = True ) with open ( behave_filename , 'r' ) as behave_json : with open ( cucumber_filename , 'w+' ) as output_file : cucumber_json = b2c . convert ( json . load ( behave_json , encoding ) ) json . dump ( cucumber_json , output_file , ** dump_kwargs ) return 0
convert behave json dialect into cucumber json dialect .