UiPath Documentation
activities
latest
false
重要 :
このコンテンツの一部は機械翻訳によって処理されており、完全な翻訳を保証するものではありません。 新しいコンテンツの翻訳は、およそ 1 ~ 2 週間で公開されます。
UiPath logo, featuring letters U and I in white

開発者向けのアクティビティ

最終更新日時 2026年4月21日

JSON を逆シリアル化

UiPath.WebAPI.Activities.DeserializeJson

説明

JSON 文字列またはサンプルを JObject に逆シリアル化します。

プロジェクトの対応 OS

Windows - レガシ | Windows | クロスプラットフォーム

Windows、クロスプラットフォームでの設定

  • JsonString - 逆シリアル化される JSON を含む文字列です。JSON は、インデントなしで、二重引用符で囲んで記述する必要があります。JSON 内の文字列は、一重引用符で記述する必要があります。たとえば、次の JSON が有効です。"{'TenancyName': 'Documentation', 'UsernameOrEmail': 'Documentation', 'Password': 'Documentation'}"
  • JSON Sample - The JSON sample for the output structure. The activitiy converts this sample into a similar object which you can use during design time.
詳細オプション
入力
  • Input Type - A dropdown list that enables you to select the argument type of the object to deserialize.
    注:

    In Studio Web, parsing the sample object via the JSON Sample property makes the Input Type property read-only.

出力

Windows - レガシでの設定

プロパティ パネル

共通

  • 表示名 - アクティビティの表示名です。

入力

  • JSON Sample - The JSON sample for the output structure. The activitiy converts this sample into a similar object which you can use during design time.
  • JsonString - The string containing the JSON to be deserialized. Write the JSON without indents, and between double quotes. Strings inside the JSON should be written with single quotes. For example, the following JSON is valid: "{'TenancyName': 'Documentation', 'UsernameOrEmail': 'Documentation', 'Password': 'Documentation'}".

その他

  • プライベート - オンにした場合、変数および引数の値が Verbose レベルでログに出力されなくなります。
  • TypeArgument - A drop-down list that enables you to select the type of output returned. The provided JSON string will be converted to an object of the selected type.

出力

[JSON を逆シリアル化] の使用例

The Deserialize Json activity is used for extracting data from JSON files and strings.

To exemplify how to use this activity, we have created an example that uses the Deserialize Json activity for extracting the age of a person from a JSON file.

サンプルと同等のオートメーション プロセスは以下のように構築できます。

  1. Studio を開いて、新しいプロセスを作成します。
  2. ワークフロー デザイナーに [シーケンス] をドラッグします。
    • 次の変数を作成します。

      変数名変数の型既定値
      JsonText文字列
      JsonObjJObject
      AgeGenericValue
  3. [テキスト ファイルを読み込み] アクティビティを、シーケンス コンテナー内部にドラッグします。
    • [プロパティ] パネルで、[ファイル名] フィールドに値 "JsonString.txt" を追加します。
    • Content (コンテンツ) フィールドに変数 JsonText を追加します。
  4. Add a Deserialize JSON activity after the Read Text File activity.
    • [プロパティ] パネルで、[Json 文字列] フィールドに変数 JsonText を、[Json オブジェクト] フィールドに変数 JsonObj を追加します。
    • TypeArgument ドロップダウン リストから値 Newtonsoft.Json.Linq.JObject を選択します。
  5. [代入] アクティビティを、[JSON を逆シリアル化] アクティビティの下に配置します。
    • [左辺値 (To)] フィールドに変数 Age を、[右辺値 (Value)] フィールドに式 JsonObj.SelectToken("age").ToString を追加します。
  6. Drag a Write Line activity after the Assign activity.
    • [テキスト] フィールドに変数 Age を追加します。
  7. プロセスを実行します。ロボットは、.json ファイルから年齢の値を抽出し、それを Output パネルに表示します。

こちらから サンプルをダウンロードできます。

このページは役に立ちましたか?

接続

ヘルプ リソース サポート

学習する UiPath アカデミー

質問する UiPath フォーラム

最新情報を取得