Skip to main content

Component Plug-In SDK 2026 R1

Method FromJson

Last update: 19.06.2026

Namespace: Phoenix.Pacz
Assembly: Phoenix.Pacz.dll

FromJson(string)

Reads in a JSON string and creates a ComponentConfig.

public static ComponentConfig FromJson(string json)

Parameters

json string

The JSON to read

Returns

ComponentConfig

The created ComponentConfig

Remarks

This version does not support file variables

Exceptions

NotSupportedException

If a Phoenix.PaczAPI.IRuntimeVariable.DefaultValue is of type Phoenix.ModelCenter.Common.Types.FileValue and it contains contents

Exception

If there are any errors converting from JSON

FromJson(string, Func<string, Handle<FileDeleter>>)

Reads in a JSON string and creates a ComponentConfig.

public static ComponentConfig FromJson(string json, Func<string, Handle<FileDeleter>> fileStore)

Parameters

json string

The JSON to read

fileStore Func<string, Handle<FileDeleter>>

If a Phoenix.PaczAPI.IRuntimeVariable.DefaultValue is of type FileValue and has contents this function will be called to allow the caller to read the contents out of bounds from the JSON. The string that was returned from the fileStore passed to Phoenix.PaczAPI.IReadOnlyComponentConfig.ToJson(System.Func{Phoenix.ModelCenter.Common.Types.FileValue,System.String},System.Boolean) will be passed to this function and this function is expected to return a handle to a file on disk to be used by the FileValue.

Returns

ComponentConfig

The created ComponentConfig

Exceptions

Exception

If there are any errors converting to JSON

Connect with Ansys