263 posts
  • Has been part of the Envato Community for over 6 years
  • Located in Antarctica
  • Has sold $100+ on Envato Market
  • Has collected 1+ items on Envato Market
+1 more
x360c says

I am working on a system to transfer data to any language. I can encode, but I can’t seem to decode them.

Here’s the string:
title01:Basic Thread;posts:{0:{author:9;message:blah};1:{author:54;message:blah};2:{author:11;message:blah};};
Can someone help me start to split that into:
vars[title01]
vars[posts]
vars[posts][0]
vars[posts][0][author]
vars[posts][0][message]
vars[posts][1]
vars[posts][1][author]
vars[posts][1][message]
vars[posts][2]
vars[posts][2][message]
vars[posts][2][message]

Any help AT ALL would be appreciated =)

3256 posts
  • Has referred 100+ members
  • Has sold $250,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+9 more
ParkerAndKent says

Is that string serialized?

263 posts
  • Has been part of the Envato Community for over 6 years
  • Located in Antarctica
  • Has sold $100+ on Envato Market
  • Has collected 1+ items on Envato Market
+1 more
x360c says
Is that string serialized?
What do you mean?
3256 posts
  • Has referred 100+ members
  • Has sold $250,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+9 more
ParkerAndKent says

title01:Basic Thread;posts:{0:{author:9;message:blah};1:{author:54;message:blah};2:{author:11;message:blah};};

How do you obtain this string? Are you using some server side script to create this string?

3256 posts
  • Has referred 100+ members
  • Has sold $250,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+9 more
ParkerAndKent says

Anyway if you need to transport complex objects as arrays from actionscript to many other languages I suggest you to encode and decode these objects with JSON

http://www.json.org/

There are as 2 and as 3 classes to work with it ;-)

375 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 1+ members
  • Has sold $1,000+ on Envato Market
  • Has collected 1+ items on Envato Market
+2 more
Nythe says

You could put this information in an XML object instead and it would be much easier to access the separate components of the string.

563 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 1+ members
  • Has sold $100+ on Envato Market
  • Located in Brazil
+2 more
LuizZak says

I’ll have a try to undoce this :)

279 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 10+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 1+ items on Envato Market
+4 more
FonZ says

looks serialized to me btw. Do you pull this out of a text file or something? If so, use php to unserialize it. Use php.net to figure it out.

107 posts
  • Has been part of the Envato Community for over 6 years
  • Has sold $100+ on Envato Market
the_asman says

as2 or as3?

926 posts
  • Has referred 50+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+3 more
michelsteege says
You could put this information in an XML object instead and it would be much easier to access the separate components of the string.

Disagree, Like ParkerAndKent said use json to do this (also look at the adobe core lib in there is a json connector and encoder/decoder) it is much faster then xml and easyier. you just get a object or array that you can acces :)

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by