📢 Webサイト閉鎖と移転のお知らせ
このWebサイトは2026年9月に閉鎖いたします。
新しい記事は移転先で追加しております。(旧サイトでは記事を追加しておりません)

38行目: 38行目:
<u>JSON for Modern C++は、[[その他_-_ソフトウェアライセンス#MIT_License|MITライセンス]]である。</u><br>
<u>JSON for Modern C++は、[[その他_-_ソフトウェアライセンス#MIT_License|MITライセンス]]である。</u><br>
<br>
<br>
==== JSON for Modern C++のインストール ====
==== JSON for Modern C++のインストール ====
===== Linux =====
===== Linux =====
62行目: 61行目:
各プロジェクトファイルに配置して、json.hppをインクルードして使用する。<br>
各プロジェクトファイルに配置して、json.hppをインクルードして使用する。<br>
<br>
<br>
==== JSONファイルの読み込み ====
==== JSONファイルの読み込み ====
  <syntaxhighlight lang="c++">
  <syntaxhighlight lang="c++">
68行目: 66行目:
  #include <fstream>
  #include <fstream>
  #include "nlohmann/json.hpp"
  #include "nlohmann/json.hpp"
using namaspace std;
   
   
  // JSONファイルの読み込み
  // JSONファイルの読み込み
101行目: 101行目:
  #include <fstream>
  #include <fstream>
  #include "nlohmann/json.hpp"
  #include "nlohmann/json.hpp"
using namaspace std;
   
   
  // 書き込むJSONファイルの内容
  // 書き込むJSONファイルの内容
142行目: 144行目:
   
   
  using json = nlohmann::json;
  using json = nlohmann::json;
using namespace std;
   
   
  // JSONファイルの読み込み
  // JSONファイルの読み込み