This topic describes the ST_JsonString function. This function returns a user-defined JSON string in a material object.

Syntax

cstring ST_JsonString(material material);

Parameters

Parameter Description
material The material object.

Description

This function returns a user-defined JSON string in a material object. If no user-defined JSON strings exist in the material object, NULL is returned.

Examples

 SELECT ST_JsonString(ST_MakeMaterial('{"pbrMetallicRoughness": {"baseColorFactor": [ 1.000, 0.766, 0.336, 1.0 ], "metallicFactor": 0.5,"roughnessFactor": 0.1}}', ARRAY(SELECT the_texture from t_texture)));

-------------------------------
 {"pbrMetallicRoughness":{"baseColorFactor": [1.0,0.766,0.336,1.0], "metallicFactor":0.5,"roughnessFactor":0.1}}