Server permanent values and blobs

I’m trying to save a blob into the server permanent value store with odd results…

If I call server.setpermanentvalues(…) with something of type blob, when I read the value back from the server using theblob = server.permanent.savedblob; The blob comes back as type string rather than type blob, and the length is extended compared to the original blob length.

By contrast server.setpermanentvalues(…) with an array appears to function as expected. i.e. when I read the thing back from the server it comes back as an array and with the same length as when I saved it.

Is this expected behaviour?

Toby

http://devwiki.electricimp.com/doku.php?id=electricimpapi:server:setpermanentvalues
according to the documentation, you should not use a blob

Thanks - Blobs aren’t specifically mentioned, but I suspect they are not ‘serialisable squirrel’

Thanks again

Actually this page http://devwiki.electricimp.com/doku.php?id=serialisablesquirrel states that blobs are serialisable

The rules for server.setpermanentvalues are a bit tighter, and blobs aren’t supported, sorry. The serialisablesquirrel page does sort-of say that, but I’ll edit it to make it clearer.

Peter

Thanks Peter, yes on further reading of the page I noticed it did say that right at the bottom. Arrays are fine for my purposes here, so I’ll use one of them instead.

Toby