Link | deserialize85 |
Author | Johan Solve |
Category | Technical |
Version | 8.5.x |
License | Public Domain |
Posted | 04 Jun 2009 |
Updated | 04 Jun 2009 |
More by this author... |
This tag can be used as replacement for [deserialize] to be able to deserialize data that contains date types and that has been serialized in Lasso 8.1 (or earlier, likely). Thanks for Bil Corry for coming up with the actual fix.
deserialize85(''); date _global_date_ %m/%d/%Y %H:%M:%S false AAAAAAAAAAAAAAAAAAAADAAAAAkAAAAEAAAABQAAAG0AAAAEAAAAmgAAAAEAABwgBoGrUAN9AAD////EAAAAAAAAAAAAAAAA
Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.
define_tag('deserialize85', -required='input', -copy); local('datebyte'=null, 'datebyte64_fixed'=null); local('datebytes' = string_findregexp(#input,-find='(?s)date .*?([^<]*)')); iterate(#datebytes, local('datebyte64')); if(loop_count % 2 == 0); #datebyte=decode_base64(#datebyte64); if(#datebyte -> size > 64); #datebyte64_fixed = encode_base64(#datebyte->getrange(4,#datebyte->size - 8)); #input -> replace(#datebyte64, #datebyte64_fixed); /if; /if; /iterate; return(deserialize(#input)); /define_tag;
No comments
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft