cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

how to convert datashape value to Json

ds-21
7-Bedrock

how to convert datashape value to Json

what it do the below syntax?any one help me

var result = DataShapes["farm1Datashape"].GetDataShapeMetadataAsJSON();

1 REPLY 1
nkhose
12-Amethyst
(To:ds-21)

It will return metadata of  the Datashape as JSON , as like


{"fieldDefinitions":{"customercount":{"name":"customercount","aspects":{},"description":"","baseType":"INTEGER","ordinal":8.0},

"orderNumber":{"name":"orderNumber","aspects":{},"description":"orderNumber","baseType":"INTEGER","ordinal":0.0},

"comments":{"name":"comments","aspects":{},"description":"comments","baseType":"STRING","ordinal":5.0},

"requiredDate":{"name":"requiredDate","aspects":{},"description":"requiredDate","baseType":"DATETIME","ordinal":2.0},

"customerNumber":{"name":"customerNumber","aspects":{},"description":"customerNumber","baseType":"INTEGER","ordinal":6.0},

"orderDate":{"name":"orderDate","aspects":{},"description":"orderDate","baseType":"DATETIME","ordinal":1.0},

"shippedDate":{"name":"shippedDate","aspects":{},"description":"shippedDate","baseType":"DATETIME","ordinal":3.0},

"status":{"name":"status","aspects":{},"description":"status","baseType":"STRING","ordinal":4.0}}}

This will be helpful DataShape (ThingWorx Platform API 6.5.11)

Announcements


Top Tags