[webkit-help] JSC: JSValueCreateJSONString

Brent Fulgham bfulgham at gmail.com
Thu Jun 10 08:38:21 PDT 2010


Hi Brian,

On Jun 5, 2010, at 4:37 PM, Brian Barnes wrote:

> I would like to save the state of several scripts.  My system is event driven so there is never any script in an executing state when I save/load.  This means all I need to save is the global object.  Looking through the headers I found:
> 
> JSValueCreateJSONString/JSValueMakeFromJSONString
> 
> This, of course, is perfect for me, but it doesn't seem to be implemented in my build (which is pretty recent.)  This might be a mis-understanding on my part about how to get these features in, or it's just not implemented yet (the actually function address is NULL.)
> 
> Is this me not understanding the code or is this a feature I'll have to wait for?  I should point out that I'm just grabbing the nightly build and pulling out the framework.  Is there another way to serialize/de-serialize an object in a script?

Are you sure you are linking against your recent build?  JavaScriptCore is a core component of Mac OS, so you might be inadvertently linking against the system version.  I've made this mistake before, and even trashed my OS by clobbering the system JavaScriptCore with my build in an effort to force things to link properly!  :-)

I'm not sure which OS you are running on (or which version of Safari is installed).  The header indicates this feature should be present as of Safari 4.0, so it seems likely that even the system WebKit would have it, but it's worth double-checking.

Aside from that, I would expect the feature to be present.  I'll see if I can try this out myself and suggest anything else.

-Brent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-help/attachments/20100610/768a32f5/attachment.html>


More information about the webkit-help mailing list