Sorry to be a pain in the ass, but still nothing.

I tried both:

[{'data':65, 'label':'fred'}, {'data':22, 'label':'bob'}, {'data':1, 'label':'liz'}]
and
"
[{'data':65, 'label':'fred'}, {'data':22, 'label':'bob'}, {'data':1, 'label':'liz'}] "
in the browser, and I just return the argument.  In the return, though, I get a string, and not an ArrayCollection or anything like that.

Am I supposed to be seeing an arraycollection or another data type besides a string if I just return what's passed?

Also, does anyone have a working example of passing the array(s), and actually reading them.  E.G. passing:

"
[{'data':65, 'label':'fred'}, {'data':22, 'label':'bob'}, {'data':1, 'label':'liz'}] "

and then returning $argument [ 0 ]['data'] ?

Alex

On Sat, Apr 5, 2008 at 9:09 PM, Patrick Mineault <patrick.mineault@gmail.com> wrote:
[{'data':65, 'label':'fred'}, {'data':22, 'label':'bob'}, {'data':1, 'label':'liz'}]

Patrick

On Sat, Apr 5, 2008 at 8:27 PM, Alex Cook <cook@propellingsolutions.com> wrote:
hey, thanks again, still no luck.... does anyone have a working example of passing a json array to the new browser?

I tried everything, simplified it down, have my method return count ( $argument ), here's what I get on each of these:

[{data:65, label:fred}, {data:22, label:bob}, {data:1, label:liz}] - Argument #0 is not a valid JSON string
"[{data:65, label:fred}, {data:22, label:bob}, {data:1, label:liz}]" returns 1, which isn't correct...
[{'data':65, 'label':fred}, {'data':22, 'label':bob}, {'data':1, 'label':liz}]
"[{'data':65, 'label':fred}, {'data':22, 'label':bob}, {'data':1, 'label':liz}]" - also returns 1, which isn't true, since the length is 3.

Does anyone have a working example?  Can't seem to get it to work...

Alex


On Sat, Apr 5, 2008 at 1:09 PM, Patrick Mineault <patrick.mineault@gmail.com> wrote:
Size is not quoted.

Patrick


On Sat, Apr 5, 2008 at 1:02 PM, Alex Cook <cook@propellingsolutions.com> wrote:
Great, thanks for the feedback.

Played around with it a bit more, tried the following.  The method just takes one argument and returns the count() of that argument ,since it's an array.

[{'ID':97, 'Label':Size, 'Token':13x13}, {'ID':97, 'Label':Size, 'Token':15x15}]
- Argument #0 is not a valid JSON string

"[{'ID':97, 'Label':Size, 'Token':13x13}, {'ID':97, 'Label':Size, 'Token':15x15}]"
returns a length of 1, and not 2...

Am I missing something obvious?

Thanks,

Alex



On Sat, Apr 5, 2008 at 12:34 PM, Patrick Mineault <patrick.mineault@gmail.com> wrote:
I think you have to put the keys (ID, Label, Token) in single quotes. 1.2 used to work with the PHP JSON decoder while 1.9 uses an AS3 class which looks more picky.

Patrick

On Fri, Apr 4, 2008 at 11:00 PM, Alex Cook <cook@propellingsolutions.com> wrote:
Hey all,

In the old amfphp (1.2), I remember you used to be able to pass arrays to the service browser like this:

[{ID:97, Label:'Size', Token:'13x13'}, {ID:97, Label:Size, Token:'15x15'}]

... and then in your method you could read the argument as an array, like this:

$Argument [ 0 ] [ 'ID' ] // gives you 97

I can't get this to work on the new service browser, does anyone know how to get it to work?

I'm not so much interested in the service browser as I am with being able to pass it to the json.php file...

Thanks in advance!

Alex Cook

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Register now and save $200. Hurry, offer ends at 11:59 p.m.,
Monday, April 7! Use priority code J8TLD2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
amfphp-general mailing list
amfphp-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amfphp-general



-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Register now and save $200. Hurry, offer ends at 11:59 p.m.,
Monday, April 7! Use priority code J8TLD2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
amfphp-general mailing list
amfphp-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amfphp-general



-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Register now and save $200. Hurry, offer ends at 11:59 p.m.,
Monday, April 7! Use priority code J8TLD2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
amfphp-general mailing list
amfphp-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amfphp-general



-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Register now and save $200. Hurry, offer ends at 11:59 p.m.,
Monday, April 7! Use priority code J8TLD2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
amfphp-general mailing list
amfphp-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amfphp-general



-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Register now and save $200. Hurry, offer ends at 11:59 p.m.,
Monday, April 7! Use priority code J8TLD2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
amfphp-general mailing list
amfphp-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amfphp-general



-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Register now and save $200. Hurry, offer ends at 11:59 p.m.,
Monday, April 7! Use priority code J8TLD2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
amfphp-general mailing list
amfphp-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amfphp-general