We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
this would be useful as a command line tool as well, something like:
__main__.py
#!/usr/bin/env python """ Cli jsonmerge tool. """ import argparse import json import jsonmerge ARGP = argparse.ArgumentParser( description=__doc__, formatter_class=argparse.RawTextHelpFormatter, ) ARGP.add_argument('files', nargs='+', help='Json Input Files') ARGP.add_argument('--merge-strategy', '-X', help='Root node merge strategy') def main(argp=None): if argp is None: argp = ARGP.parse_args() schema = dict() if argp.schema: with open(argp.schema) as file_handle: schema = json.load(file_handle) result = {} for file in argp.files: with open(file) as file_handle: result = jsonmerge.merge(result, json.load(file_handle), schema) print(json.dumps(result, indent=4)) if __name__ == '__main__': main()
With
That would be great.
The text was updated successfully, but these errors were encountered:
Hi. If you can develop this feature and add tests and documentation, I would be happy to accept a pull request.
Sorry, something went wrong.
No branches or pull requests
this would be useful as a command line tool as well, something like:
__main__.py
With
the ability to apply a merge strategy to the root nodeThat would be great.
The text was updated successfully, but these errors were encountered: