| Crates.io | idl2json_cli |
| lib.rs | idl2json_cli |
| version | 0.10.1 |
| created_at | 2023-06-09 14:32:46.320823+00 |
| updated_at | 2024-03-06 19:54:49.439534+00 |
| description | Converts the candid interface description language to JSON. |
| homepage | https://github.com/dfinity/idl2json |
| repository | https://github.com/dfinity/idl2json |
| max_upload_size | |
| id | 886306 |
| size | 48,184 |
Reads Candid textual values from stdin and emits them as json values on stdout.
This command is useful for piping the output of Candid value producing tools (such as dfx) into json tools.
dfx canister call governance get_proposal_info 1 | idl2json
There is sample output to play with without dfx:
<samples/proposal.idl ./target/debug/idl2json
cargo binstallcargo binstall will install a pre-built binary, if available, else compile from source:
cargo binstall idl2json_cli --no-confirm
cargo installcargo install will download, compile and install:
cargo install idl2json_cli
Build with any of the following methods. The binary executable will be at idl2json/target/{debug,release}/idl2json (depending on whether cargo build --release is used).
nix-shell --command 'cargo build'
brew install libiconv
export LIBRARY_PATH=/usr/local/Cellar/libiconv/1.16/lib/
cargo build