JSON hex colors

Steps causing the bug to occur

I think something like this will work but is there a better way than using Split Text and Cut Text to strip out brackets and quotes in this JSON list of hex colors?

[["#9d7e79","#ccac95","#9a947c","#748b83","#5b756c"],["#fcfef5","#e9ffe1","#cdcfb7","#d6e6c3","#fafbe3"],["#9cddc8","#bfd8ad","#ddd9ab","#f7af63","#633d2e"],["#30261c","#403831","#36544f","#1f5f61","#0b8185"],["#aaff00","#ffaa00","#ff00aa","#aa00ff","#00aaff"],["#d1313d","#e5625c","#f9bf76","#8eb2c5","#615375"],["#ffe181","#eee9e5","#fad3b2","#ffba7f","#ff9c97"],["#73c8a9","#dee1b6","#e1b866","#bd5532","#373b44"],["#805841","#dcf7f3","#fffcdd","#ffd8d8","#f5a2a2"]]

json colors.vuo (5.33 KB)

The answer is to use Replace Text. Solved here: https://community.vuo.org/t/-/6927  

1 Like

This is actually a bug in Make Tree from JSON. It doesn’t handle arrays of arrays correctly.

Good that you found a workaround, @jersmi. Another workaround is to restructure the JSON data as an array of objects, like in the attached composition.

json-array-array-workaround.vuo (2.63 KB)

1 Like

Oh, wow. Well, hats off to Vuo for providing the tools to work around that one!

The bug in Make Tree from JSON is fixed in Vuo 2.4.4.

@jersmi, here’s a simplified version of your original composition that now works:
json_colors2.vuo (4.3 KB)

Heads up that this breaks your JSON Color Palettes composition — you might want to update it now that Vuo expects a slightly different data format.