Table of Contents

Class JsonUtil

Namespace
Hi.Common
Assembly
HiGeom.dll

Helper utilities for reading and writing JSON files.

public static class JsonUtil
Inheritance
JsonUtil
Inherited Members

Methods

CallJsonArrayByPath(JsonObject, IEnumerable<string>)

public static JsonArray CallJsonArrayByPath(this JsonObject srcdst, IEnumerable<string> jsonObjectPath)

Parameters

srcdst JsonObject
jsonObjectPath IEnumerable<string>

Returns

JsonArray

CallJsonObjectByPath(JsonObject, IEnumerable<string>)

public static JsonObject CallJsonObjectByPath(this JsonObject srcdst, IEnumerable<string> jsonObjectPath)

Parameters

srcdst JsonObject
jsonObjectPath IEnumerable<string>

Returns

JsonObject

WritePartialJson<TConfig>(string, string, TConfig)

Writes a config object into a named section of a JSON file; merges when file exists and overwrites the same section name.

public static void WritePartialJson<TConfig>(string filePath, string configName, TConfig config)

Parameters

filePath string

JSON file path

configName string

Section name to write

config TConfig

Section object to write

Type Parameters

TConfig

Type of the config object