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 a8b47ac commit 78fc678
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 78fc678

Please sign in to comment.