Are you talking about serializing some structure to store in a
BlobProperty on a datastore entity?  If you want to use json, why not
just write yourself a nice helper method, or new db.Property, so that
access works nicely too?  In fact, I think there are several versions
of "JSONProperty" floating around already.

You could view the source of the model_{to,from}_protobuf methods.
They are specific to db.Model.


Robert




On Tue, Jun 21, 2011 at 19:03, thecheatah <[email protected]> wrote:
> I need to serialize a data structure to be stored as a blob in python.
> What is the best way to do so? My main concern is speed. I have looked
> into using simplejson, python pickle and model_from_protobuf. I am
> assuming that model_from_protobuf is the fastest and most efficient
> way. Tests show that simplejson is much faster then the python pickle.
> I would rather be able to directly translate the objects from storage
> to python objects as pickle and model_from_protobuf would allow.
>
> Can model_to_protobuf be used for what I want? Will the protocol ever
> change and cause my encoded data to become unreadable?
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine" 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-appengine?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" 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-appengine?hl=en.

Reply via email to