Fixed 'sync'. Added dependencies for JSON to (Sunroof a) conversion.

'sync' should now work properly.
The JSON to JSValue conversion maybe should be moved somewhere else.
THe conversion for objects and arrays should work just fine, but in future
proper representations might be valuable.