User Tools

Site Tools


compiler

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
compiler [2018/05/17 06:37]
admin [msToTimecode]
compiler [2019/07/08 14:51] (current)
admin [GetJsonValue]
Line 599: Line 599:
  
  
 +==== GetJsonValue ==== 
  
 +Use this function to get the value of a json element.
 +Parameters:
 +  * JsonString , the string containing the json objects
 +  * JsonElement,​ the element from which the value is requested
 + 
 +Returns ​ an empty string if element is not found, otherwise the element'​s value
 +
 +<​code>​
 +dim result as string
 +result = GetJsonValue(JsonString,​ JsonElement)
 +</​code>​
 +
 +Below is a json result from an AJA FS HDR. This is the content of IOResult after sending a get Parameter command.
 +<​code>​
 +{"​paramid":"​97380772","​name":"​eParamID_RegisterRecall","​value":"​2","​value_name":"​2"​}
 +</​code>​
 +
 +To get the value of the element "​name",​ write something like this:
 +
 +<​code>​
 +dim res as string
 +res = GetJsonElement(IOResult,"​name"​)
 +</​code>​
 +
 +The result will be eParamID_RegisterRecall
 +----
 ==== GetMinute ====    ​ ==== GetMinute ====    ​
 Result integer Result integer
compiler.1526539051.txt.gz ยท Last modified: 2018/05/17 06:37 by admin