-
February 9th, 2011, 09:11 AM
#2
hi,
I'm not sure I understood your problem.
if you have an object you want to pass as json to the client you can simply pack it into a string on your data adapter and pass it as the value of a field; then you'll receive it as an update on your client where you'll have to deserialize it.
please note that doing so you’ll lose some of the optimizations offered by Lightstreamer protocol. For example, the merging algorithm (of the MERGE mode) is applied to the entire object instead of being applied to each single field, so that every time a property within the json object changes, the entire object is pushed to the client, not only the changed value.
A more efficient way would be to map each of the properties of the json object to single fields. This may or may not be feasible depending on how structured is the object.
please check also the Server-Side section of this blog post: http://goo.gl/a40yR
the approach shown is based on AMF objects, btw excluding the serialization process (ie the toAMF method) it applies to your case too.
Similar Threads
-
By latha in forum Client SDKs
Replies: 6
Last Post: December 7th, 2010, 09:26 AM
-
By eweinberg in forum Adapter SDKs
Replies: 3
Last Post: November 11th, 2010, 07:09 AM
-
By sachinpatel2 in forum Client SDKs
Replies: 1
Last Post: September 10th, 2010, 10:01 AM
-
By latha in forum Client SDKs
Replies: 1
Last Post: January 18th, 2010, 03:27 PM
-
By Alessandro in forum Client SDKs
Replies: 1
Last Post: March 2nd, 2007, 11:57 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
All times are GMT +1. The time now is 04:46 PM.
Bookmarks