jSwan - Why can the de-serialise component read a text panel but not a text input?

@andheum

I can’t get the de-serialise component to read text from a text component but I can get it to read once the text from that component has been copied over to a text panel.

Frustrating issue, any suggestions?

Example .gh file below:
Example.gh (10.8 KB)

I’m at home now with only a tablet, so I can’t open your file, but the wire from the text parameter is double, meaning more than one piece of text is flowing through it. Could it be that your text parameter contains all the lines individually, instead of all together as a single block of text?

1 Like

Your data is indeed over multiple blocks.

These blocks separately are not correct JSON, hence the error message. Not sure how you managed to seed this parameter component with the data like this.

If you intend to get the same text of the panel in the text parameter you should make it into one long string, something along the lines of

your_json_as_one_line = "".join(your_json_over_multiple_lines.strip().split())

That you can copy&paste into the text parameter through its parameter menu.

With everything as one line so you have proper JSON you’ll get

1 Like

Beautiful, adding a ‘text join’ component in-between did the trick.

Thanks!