Skip to content

Commit

Permalink
Verification that a JSON and TOML dataset are identical
Browse files Browse the repository at this point in the history
  • Loading branch information
franzpoeschel committed Apr 18, 2023
1 parent d4f998c commit 46fcfcd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions share/openPMD/json_schema/verify_identical.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

if (( $# != 2 )); then
echo "Usage: $BASH_SOURCE <toml_file> <json_file>" >&2
exit 1
fi

diff \
<(openpmd-convert_json_toml "@$(realpath "$1")" | jq -S .) \
<(jq -S . < "$2")

0 comments on commit 46fcfcd

Please sign in to comment.