I don't know if I would be in favor of something built-in that is specifically JSON, but maybe more allow for nesting lists.
Also, I feel like this use case is also something for an embedded scripting system ala including a minimal "vanilla lua" where these kinds of problems are IMO just easier to solve in that kind of environment. I tend to separate my mapping and audio into pure Pd and do the rest in other environments. It would be nice to bing some of that back into Pd without having to patch it *and* having remaining vanilla.
On Feb 10, 2026, at 12:05 AM, Chris McCormick chris@mccormick.cx wrote:
On 09/02/2026 23:14, Dan Wilcox wrote:
[dict] proposal?
I've often thought it would be interesting to have JSON-like data that flows through Pd's graphs, rather than being "at rest" like the [text] object. For example, let's say you had a message box containing: {"hello": 42}
You send it into [json-get-in "hello"] and out comes 42. The right inlet takes the "coordinates" to look up within the datastructure.
A more complicated example is {"things": [1, 2, 3]}.
You send it into [json-get-in "things" 1] and out comes "2".
To compose these things you can also have json-update which you can use like this:
[json-update "things" 1]
The right inlet takes the value to replace and the left inlet takes the datastructure. So if you send that same example in again and on the right inlet you send in 67 then the output is: {"things": [1, 67, 3]}.
Of course it's JSON so these documents would not have a specific shape and you could just as easily insert {"foo": "bar"} and you'd end up with {"things: [1, {"foo": "bar"}, 3]}.
You could also have a "map" type of operation similar to Frank Barknecht's list updating utilies where you send the old value out of the right inlet and take the updated value into a rightmost inlet, and the old value is replaced at those coordinates within the datastructure.
With these operations the JSON is not something that sits at rest in a [text] like object but rather it is data that is flowing through the graph just like audio does.
I guess it's similar to the 'list' family of objects, but for nested datastructures rather than just flat lists of atoms.
To me this has always felt like something that would be useful in Pd.
Cheers,
Chris.
Dan Wilcox danomatika.com http://danomatika.com/ robotcowboy.com http://robotcowboy.com/