語言

StructuredJsonPath 類別

定義

代表結構化的 JSON 路徑,包含屬性名稱段與陣列索引佔位符,以及陣列位置的執行時索引值。

[System.Runtime.CompilerServices.Nullable(0)]
public class StructuredJsonPath
[<System.Runtime.CompilerServices.Nullable(0)>]
type StructuredJsonPath = class
Public Class StructuredJsonPath
繼承
StructuredJsonPath
屬性

備註

更多資訊與範例請參閱 建模實體類型與關係 。

建構函式

名稱 Description
StructuredJsonPath(IReadOnlyList<StructuredJsonPathSegment>, IReadOnlyList<Nullable<Int32>>)

建立新的 StructuredJsonPath 實例。

屬性

名稱 Description
Indices

取得陣列索引佔位符的索引值。 索引依序應用於 區段,其中 IsArray 為 true。 條 null 目表示索引器未指定(所有元素)。

IsRoot

會取得一個值,表示此路徑是否代表 JSON 文件的$根節點()。

Root

A StructuredJsonPath 代表 JSON 文件的根節點($)。

Segments

取得路徑段。

方法

名稱 Description
AppendTo(StringBuilder, Nullable<Char>)

將 JSON 路徑字串表示法附加於給定 StringBuilder的 。

ToString()

代表結構化的 JSON 路徑,包含屬性名稱段與陣列索引佔位符,以及陣列位置的執行時索引值。

ToString(Nullable<Char>)

回傳 JSON 路徑字串表示法。

適用於