We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpIntegration › Serialized drupal node objects to processing
Page Index Toggle Pages: 1
Serialized drupal node objects to processing (Read 424 times)
Serialized drupal node objects to processing
Oct 10th, 2008, 11:37am
 
While attempting to synchronise my Processing.org sketch data with a views listing on a remote Drupal website, I came across a fantastic bit of Java for converting serialized PHP objects to Java objects, and visa versa. Written by Kris Dover, the functions can convert to and from the following:

* _PHP Type_ <---------> _Java Type_
* array java.util.HashMap
* int java.lang.Integer
* double java.lang.Double
* boolean java.lang.Boolean
* string java.lang.String

As I'm only passing the data one way (PHP -> Java), I've resorted to XML for now as XML is well supported in Processing. It's good to know, however, that when I write my next Drupal/Processing.org mashup, I'll have the tools I need to use serialized data. Thanks Kris (and cheers for emailing the code).

As these forums allow for limited text entry per post, I've published the code in the Drupal forums here: http://drupal.org/node/319482
Page Index Toggle Pages: 1