From: Bob H. <ha...@st...> - 2006-02-10 16:48:04
|
Miguel wrote: > >>But the "JSON" isn't quite appropriate here, because not EVERYTHING >>delivered to the applet has to be a JSON string -- file contents for >>example -- single strings and such. They can just go straight to >>JavaScript. It's just the more complex Java objects that need JSON. > > > Correct. For those things the JavaScript should call getProperty(). > > Both getProperty and getJsonProperty should be exposed to JavaScript. I get it. Sure. Let's do that. Who knows, maybe someday JavaScript will be able to call getProperty and handle a Java object. One question: Q: Won't the return for Java getProperty() be a generic Object, so that sometimes it's a string, sometimes a Hashtable, etc.? Maybe we will need, for JavaScript: getStringProperty() getJsonProperty() so that JavaScript NEVER is allowed to call the generic Object getProperty() function. > > I looked at a Java package that is referenced at http://www.json.org ... > frankly it looked too heavyweight for me. We are only generating JSON > strings, so I think it will be easier to directly implement the conversion > routines. > Ah, I suppose so. Right -- we can run with what we have. By the way, I realized just this morning the significance of HEAD and version. (I mean, I knew the difference, just didn't put 2+2 together this time.) DUH! Right, of course what I do on HEAD may or may not ever make into a version. Somehow I was thinking that "HEAD"s just automatically get turned into versions, but of course that's not true. you can pick and choose what you want out of a HEAD to include in any next version. That I leave to you. (Still, I'm not going to commit this until I play with it a bit more and get more feedback.) Bob -- Robert M. Hanson, ha...@st..., 507-646-3107 Professor of Chemistry, St. Olaf College 1520 St. Olaf Ave., Northfield, MN 55057 mailto:ha...@st... http://www.stolaf.edu/people/hansonr "Imagination is more important than knowledge." - Albert Einstein |