Method FromJson
FromJson(string)
Reads a definition from its JSON form. Missing fields take their defaults; a definition written by a newer release (a higher schema version) is refused rather than misread.
public static AgentDefinition FromJson(string json)
Parameters
jsonstringThe JSON text.
Returns
- AgentDefinition
The definition.
Exceptions
- ArgumentException
Thrown when
jsonis null or empty.- FormatException
Thrown when the text is not an agent definition.
- NotSupportedException
Thrown when the schema version is newer than CurrentSchemaVersion.