Second output ghpythonlib.components

Hi,

I would like to get the second output of the jSwan DeserialiseKeysandValues component using ghpythonlib.components, but somehow I do not get it done:

import rhinoscriptsyntax as rs
import Grasshopper as gh
import ghpythonlib.components as ghcomp

a = ghcomp.jSwan.DeserializeKeysandValues(json,keys)[0]
b = ghcomp.jSwan.DeserializeKeysandValues(json,keys)[1]
c = ghcomp.jSwan.DeserializeKeysandValues(json,keys)

jswan_python.gh (4.7 KB)

If you’re reading/writing JSON data/files in GHPython, you’re probably better off using the native json module. Quick example here:

1 Like