Hello,
I am trying to convert posted json data with Web Server to chop where each property is a channel with their associated value.
I managed to transform the json into a table with this :
def onHTTPRequest(dat: webserverDAT, request: Dict[str, Any],
response: Dict[str, Any]) -> Dict[str, Any]:
"""
Called when an HTTP request is received.
Args:
dat: The connected Web Server DAT
request: Dictionary of request fields
response: Dictionary defining the response to be filled in
Returns:
Dict[str, Any]: The response dictionary
"""
jsonVal = json.loads(request['data'].decode('utf-8'))
print(jsonVal)
op(dat).clear()
for key, value in jsonVal.items():
op(dat).appendRow((key,value))
#...
First issue here : I need to clear each time, does it mean that the value would be null during a brief period ?
With this I got a table but when using Dat to CHOP I can’t get my channels (see screenshot), what is the recommended way for this ?
Also since the project might start with no value how can I have a default value on each channel ?
Thanks for your help.





