Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ジュニパー構成をjsonに変換する必要があります。このためのジュニパーコマンドはありますか、またはデフォルトのジュニパー構成をjsonに変換するための小さなルビーコードをどのように記述すればよいですか。
私の知る限り、JSON に変換するコマンドはありませんが、おそらく XML 形式で読み取ってから、Ruby を使用して XML を JSON に変換できますか?
JunOS
show configuration | display xml
ルビー
Hash.from_xml('...').to_json