Hi, thanks for your feedback. Here is what I came up with:
On 29.08.2011 21:31, Hans-Christoph Steiner wrote: > > Sounds interesting, do you have an application in mind? This kind of > library is best explained via an interesting example, IMHO. Currently I am working on a contrived example: a sequencer which gets the data from the database. If you have a central CouchDB server, you could control the sequencer from any other source, e.g. use the sequencer in an art installation and let users control it via a website. Contrived, yes, but doable, but I am still working on it. > On Aug 26, 2011, at 7:00 PM, Thomas Mayer wrote: >> - How should JSON data be dealt with in general? I am currently just >> outputting one long symbol separated by spaces, so an object of >> {"id":1, "name": "my-name"} >> becomes >> id 1 name my-name >> but >> {"id":1, "name": "my name", "year":2011} >> becomes >> id 1 name my name year 2011 >> and thus breaks the pattern of "key value key value key value". > > How about a message per key/value pair? Then you just need to ensure > that the key does not have spaces in it, then the value can be a symbol, > float, list, etc. It is possible to generate symbols with spaces in > them in C, and you can work with them too. The problem really is you > can't save symbols with spaces to a .pd file (unless you use DesireData) I came up with lists: The example above outputs now on the left outlet list id 1 list name my\ name list year 2011 After a JSON object is decoded, I output a bang on a second outlet, and therefore can distinguish between two objects in short succession. Best regards, Thomas -- "From the perspective of communication analysis, government is not an instrument of law and order, but of law and disorder." (Gracchus Gruad in: Robert Shea & Robert A. Wilson, The Golden Apple) http://www.residuum.org/ _______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list