Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

[ Image Removed |../../../index.htm#lansa/jsoneng01_0040.htm]
現在地: Webサービス > JSON データの作業 > XPRIM_RandomAccessJsonReader を使用した、JSON 値の読み込み > Read…AtIndex メソッド

...

Read..AtIndex は、指定のインデックスでアレイ・エレメントから値を抽出します。
「現在の」エレメントはアレイでなければいけません。

  • 連絡先を保持する XPRIM_JsonObject を宣言
    Define_Com Class(#XPRIM_JsonObject) Name(#ContactNoItem)
  • インデックス 1 のオブジェクトを取得
    #ContactNoItem.Refer To(#Reader.ReadObjectAtIndex(1))
  • オブジェクトを別のメソッドに渡す
    #AnotherComponent.ProcessContactNo Object(#ContactNoItem)
    [ Image Removed |../../../index.htm#lansa/jsoneng01_0040.htm]