On Tue, Dec 8, 2009 at 10:36 AM, Jiang, Guoqian, Ph.D. <
[email protected]> wrote:

>  My  use case is that I want to reprensent a tree structure in a google
> wave gadget and a group will work collaboratively on curating the tree
> structure e.g. editing a node, adding a sub node or deleting a node.
>
> Assuming the tree structure is based on a json object, my question is
> whether there is a persistence layer API to store and restore a json object,
>

You can serialize the JSON to a text string, and store that text string, as
Pamela says, but I would not recommend serializing the entire tree in this
way.  If two people are editing different parts of the tree at the same
time, one person's edits could revert the edits done by the other person, if
they are made close together.  If you can come up with a scheme to represent
your tree in as granular a manner as possible, that would work best,
possibly by doing something like:

...submitDelta({'tree.0.1.0'}, value)  # Sets the first child of the second
child of the first child of the tree

By doing this, you're reinventing some of what Wave automatically does for
blip content.  It's a shame there isn't a way to better leverage that (e.g.
a DataBlip that you control the mutations to and presentation of).

David

--

You received this message because you are subscribed to the Google Groups 
"Google Wave API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-wave-api?hl=en.


Reply via email to