Skip to content

JTokenExtensionsGetSet

Rob edited this page Aug 4, 2026 · 1 revision

JTokenExtensionsGetSet Class

Extra helpers for getting and setting

public static class JTokenExtensionsGetSet

Inheritance System.Object 🡒 JTokenExtensionsGetSet


Methods


JTokenExtensionsGetSet.GetSet<T>(JToken, string, T) Method

Get the value if there, if not, return default value. Ensure its present in the Object
if the value is not compatible it will be overwritten

public static T GetSet<T>(this QuickJSON.JToken token, string name, T defaultvalue);
Type parameters

T

Parameters

token JToken
JObject to get the value from. Assert if not value

name System.String
property name

defaultvalue T
default value to use if value is not there or not int

Returns

T
Current value

Exceptions

JsonException
GetSet on a non object

Clone this wiki locally