Exporting/importing Dynamo lists to/from string

Hi,
I am looking for a way to export set of nested lists with string/numeric values to one serialized string like JSON or similar. After this I need to import it back in same script but with different Revit model.

I have real trouble both finding or starting any package which supposed to convert any data to JSON. Usually they ask to provide keys and values separately, but I don’t want to (and I can’t). Just serializing the set I give in one input.

Does anybody know any reliable package for such operations?

Just in case, I am a little bit into Python, so any Python script or library would be fine for me as well.

Thanks.

Hi @igor.mig,

Have you, by any chance, looked into the JsonData package by Alvaro Pickmans?

Yes I have, but I had troubles - after installation I cannot find nodes in the library although the package is present in the manager. I run Dynamo 2.0.3, maybe it is not properly supported… ?

I found DynamoJson package, but I also struggle with using it. The node gives unknown error without any specific description.

CC: @alvpickmans :slight_smile:

Regarding the python, you could have a look here for JSON documentation for IronPython.

1 Like

Sadly I don’t have R2019 atm to test JsonData Dynamo 2.0.3. Any chance you could check if there is any log in the Dynamo Console regarding issues when loading the package?

Hi, the Lunchbox might help you out. I have only used the package for xml data so cant tell for sure. But i know it has some nodes that converts data sets to json.

Perhaps, just perhaps, String.FromArray and call it a day?

2 Likes