Click or drag to resize

SKMLoadProductVariablesFromString Method

This method will load ProductVariables data from a json serialized string. (see Example below.)

Namespace:  SKGL
Assembly:  SKM (in SKM.dll) Version: 4.0.2.6 (4.0.2.6)
Syntax
public static ProductVariables LoadProductVariablesFromString(
	string productVariablesString
)

Parameters

productVariablesString
Type: SystemString
The json version of Product Variables, i.e. {"uid":"111", "pid":"111", "hsum":"111"}

Return Value

Type: ProductVariables
Examples
An example of a string that contains the the serialized json string is shown below:
C#
public void LoadProductVariablesFromString()
{
   var productVariables = SKGL.SKM.LoadProductVariablesFromString("{\"pid\":\"test\", \"uid\":\"test1\", \"hsum\":\"test2\"}");
   Assert.AreEqual(productVariables.PID, "test");
   Assert.AreEqual(productVariables.UID, "test1");
   Assert.AreEqual(productVariables.HSUM, "test2");
}
See Also