Re: native json parsing
Dan Wilcox <[email protected]> Mon, 9 Feb 2026 16:14:10 +0100
| Newsgroups | gmane.comp.multimedia.puredata.general |
|---|---|
| Message-ID | <[email protected]> |
A but out of left field, but I have used a simple Python server to host a database lookup over OSC. The Pd patch then sent queries and the answer came over OSC. This of course is a "system" and not all "within Pd" however would be a relatively futureproof approach as long as you use stable Python APIs. As for [text], if it's too focused/complicated, maybe we should make a [dict] proposal? > On Feb 9, 2026, at 3:09 PM, Alexandre Torres Porres <[email protected]> wrote: > > Like I said, pd has data structures for arrays whose elements can be symbols or other arrays nested in any depth, but this is impractical to work with. If anyone ever made discriminators with nested dictionaries on it or nested lists, I’d like to know, but where I’m getting at is that maybe we already have the structure in pd to work with such things and perhaps we can just improve it a bit? > > If not, we’d need formally a new data type so we can do all of this. Lua has something that allows us to deal with nested lists and dictionaries, so maybe something like that. Of course, like I also said, we can natively support lua, but if this is the sole reason, a better actual solution would be this new data type. > > An object like dict from max would be cool and I don’t think it’s possible to build it with a text object. We need to be able to set and visualize nested data and text is only capable of setting and viewing lines > > Cheers > > On Mon, 9 Feb 2026 at 06:20 Patrice Colet <[email protected] <mailto:[email protected]>> wrote: >> hello, >> >> [text] object is quite a powerfull tool for building data structures, meanwhile it often need some safe recursive search. >> >> I'm working on a lua script for experimenting json on pd world if anyone wants to try: >> >> critapec-pd-externals/pdjson at main · patricecolet/critapec-pd-externals >> github.com >> <apple-touch-icon-180x180-a80b8e11abe2.png> >> <https://github.com/patricecolet/critapec-pd-externals/tree/main/pdjson>critapec-pd-externals/pdjson at main · patricecolet/critapec-pd-externals <https://github.com/patricecolet/critapec-pd-externals/tree/main/pdjson> >> github.com <https://github.com/patricecolet/critapec-pd-externals/tree/main/pdjson> <apple-touch-icon-180x180-a80b8e11abe2.png> <https://github.com/patricecolet/critapec-pd-externals/tree/main/pdjson> >> >> It's still experimental, but maybe it could give some clues about sharing json and pd structures. >> >> >>> Le 9 févr. 2026 à 09:56, Dan Wilcox <[email protected] <mailto:[email protected]>> a écrit : >>> >>> Maybe this is a good time to propose a *native* dictionary or dict-style functionality. Maybe it comes down to a special mode for [text] etc? There is a symbol name map in the rjlib but I'd also like something more flexible. >>> >>>> On Feb 9, 2026, at 9:15 AM, Pierre Alexandre Tremblay <[email protected] <mailto:[email protected]>> wrote: >>>> >>>> we do tap on one of these in flucoma, so if I do a fluid.dictionary it’ll be this that I use indeed. I just try to keep maintenance of codebase to minimum, and dependencies to null. >>>> >>>> p >>>> >>>>> On 8 Feb 2026, at 20:53, Dan Wilcox <[email protected] <mailto:[email protected]>> wrote: >>>>> >>>>> Unless the usage is very basic, I think plain vanilla as a requirement does not make sense for this. There are numerous C and C++ libraries which handle the basics and should be leveraged instead of reading bytes with [file] or something similar. Best of all, many of these libraries are only 1-2 files, so making a light wrapper external with minimal requirements for compilation should not be huge issue IMO. >>>>> >>>>>> On Feb 8, 2026, at 8:04 PM, hans w. koch <[email protected] <mailto:[email protected]>> wrote: >>>>>> >>>>>> hello pierre alexandre, >>>>>> >>>>>> a while ago i made a parser for .kml files (xml files recorded by bycicle route trackers) for a friend to sonify her tours. >>>>>> its plain vanilla and was a pita to make :-) >>>>>> if thats interesting for you, i can send you a copy of the patch. >>>>>> >>>>>> cheers >>>>>> >>>>>> hans >>>>>> >>>>>>> Am 08.02.2026 um 17:48 schrieb Pierre Alexandre Tremblay <[email protected] <mailto:[email protected]>>: >>>>>>> >>>>>>>>> did you have a look at the purest_json library, does it help? >>>>>>> I didn’t but I saw it was neither vanilla nor available for all CPUs, so that won’t be helpful in my case (except if I decide to tackle a fluid.dictionary external which i don’t want to if I can avoid it) >>>>>>> >>>>>>> hence asking if there was a native version/hack. I’ll look at Alexandre’s abstraction, that might do the trick. The idea would be to be able to dump fluid* status (mlp for instance) in text, edit, then load them back. This has been seen as useful on other platforms, so I’m trying to find a way… >>>>>>> >>>>>>>> BACH library for Pd. >>>>>>> >>>>>>> now, that is a fun challenge ;) I was talking to both Daniele and Andrea about this in the last year… it would be a fantastic addition obviously but I don’t envy the person who will do that job >>>>>>> >>>>>>> p >>>>>>> >>>>>>> >>>>>>>> On 8 Feb 2026, at 17:38, João Pais <[email protected] <mailto:[email protected]>> wrote: >>>>>>>> >>>>>>>> did you have a look at the purest_json library, does it help? >>>>>>>>> Dear all >>>>>>>>> >>>>>>>>> Apart the fact that flucoma releases (and nightles soon) are on deken (hurray!), I am slowly getting back in trying to add the last bit missing to our interface… but the lack of native dictionary style file/data structure is not helping us to keep the structured (json style) states of objects simply yet programmatically editable (like in max and supercollider) >>>>>>>>> >>>>>>>>> here is an example of one of our user’s clever use of the text object despite its limits >>>>>>>>> >>>>>>>>> https://discourse.flucoma.org/t/way-of-modifying-state-of-fluid-robustscale-in-puredata/2717/16 >>>>>>>>> >>>>>>>>> now I know there are “pd structure” magicians on here, and maybe someone has had the idea to create a sort of hack to parse json files, or even general dictionaries of associative key-values? >>>>>>>>> >>>>>>>>> Ideally, I’d be able to access those in the C api… but a temp json file is also possible on the way, we do that with SuperCollider anyway. >>>>>>>>> >>>>>>>>> any pointers (pun intended) welcome >>>>>>>>> >>>>>>>>> p >>>>>>>>> --- >>>>>>>>> [email protected] <mailto:[email protected]> - the Pure Data mailinglist >>>>>>>>> https://lists.iem.at/hyperkitty/list/[email protected]/message/YWXEUDCIFKZH5ZHUAPXYZSCA6Q2J4OBX/ >>>>>>>>> >>>>>>>>> To unsubscribe send an email to [email protected] <mailto:[email protected]> mailing list >>>>>>>>> UNSUBSCRIBE and account-management -> https://lists.i <https://lists.i/> >>>>>>>> --- >>>>>>>> [email protected] <mailto:[email protected]> - the Pure Data mailinglist >>>>>>>> https://lists.iem.at/hyperkitty/list/[email protected]/message/QI3VZVQVMYJG7XWAJSAHDBBGY76YH4UM/ >>>>>>>> >>>>>>>> To unsubscribe send an email to [email protected] <mailto:[email protected]> mailing list >>>>>>>> UNSUBSCRIBE and account-management -> https://lists.iem.at/ >>>>>>> >>>>>>> >>>>>>> --- >>>>>>> [email protected] <mailto:[email protected]> - the Pure Data mailinglist >>>>>>> https://lists.iem.at/hyperkitty/list/[email protected]/message/FDMWVTTF62B3D5JIPJM5Q4KOJVLV2OLM/ >>>>>>> >>>>>>> To unsubscribe send an email to [email protected] <mailto:[email protected]> mailing list >>>>>>> UNSUBSCRIBE and account-management -> https://lists.iem.at/ >>>>>> >>>>>> >>>>>> >>>>>> --- >>>>>> [email protected] <mailto:[email protected]> - the Pure Data mailinglist >>>>>> https://lists.iem.at/hyperkitty/list/[email protected]/message/V5ZSSTMQSAG53TNV65MQHHQ6MHE7VU4P/ >>>>>> >>>>>> To unsubscribe send an email to [email protected] <mailto:[email protected]> mailing list >>>>>> UNSUBSCRIBE and account-management -> https://lists.iem.at/ >>>>> >>>>> -------- >>>>> Dan Wilcox >>>>> danomatika.com <http://danomatika.com/> >>>>> robotcowboy.com <http://robotcowboy.com/> >>>> >>> >>> -------- >>> Dan Wilcox >>> danomatika.com <http://danomatika.com/> >>> robotcowboy.com <http://robotcowboy.com/> >>> --- >>> [email protected] <mailto:[email protected]> - the Pure Data mailinglist >>> https://lists.iem.at/hyperkitty/list/[email protected]/message/WKWXXMDY5CXVIFUZSLICJPGALSJHFLRU/ >>> >>> To unsubscribe send an email to [email protected] <mailto:[email protected]> mailing list >>> UNSUBSCRIBE and account-management -> https://lists.iem.at/ >> >> --- >> [email protected] <mailto:[email protected]> - the Pure Data mailinglist >> https://lists.iem.at/hyperkitty/list/[email protected]/message/D3DGTVM2RBPLN5CKWQYJAY4AEHH473XP/ >> >> To unsubscribe send an email to [email protected] <mailto:[email protected]> mailing list >> UNSUBSCRIBE and account-management -> https://lists.iem.at/ > --- > [email protected] - the Pure Data mailinglist > https://lists.iem.at/hyperkitty/list/[email protected]/message/R3G4OAUQLNVMPQTTAOTYUM2MGDARCJGH/ > > To unsubscribe send an email to [email protected] mailing list > UNSUBSCRIBE and account-management -> https://lists.iem.at/ -------- Dan Wilcox danomatika.com <http://danomatika.com/> robotcowboy.com <http://robotcowboy.com/> --- [email protected] - the Pure Data mailinglist https://lists.iem.at/hyperkitty/list/[email protected]/message/OLHAH4YNCEUF7EKABOWN7P6MIGZ65CT6/ To unsubscribe send an email to [email protected] mailing list UNSUBSCRIBE and account-management -> https://lists.iem.at/