get json from an object (button/...) from applescript

Hi,

Would it be possible to add an applescript function that return the full json for a given object (identified by its uuid)
something like

set myjson to get_json_trigger UUID shared_secret "XXXX" 

Thanks,

Olivier