You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by snacktime <sn...@gmail.com> on 2009/01/09 08:29:09 UTC

bit of confusion over enums

Is gender a special case?  I'm implementing a container using the shindig
javascript, and trying to figure out how to return values for enums.   Could
anyone give me a simple sample of the json to output for an enum?

Also while I'm here, what's the deal with formatted vs unstructured?  I
haven't looked at an rpc call to a shindig container returning the address
yet, but I did see that the person name is returned using formatted instead
of unstructured.

Alternatively, is there a container somewhere running shindig with a gadget
that makes rpc calls to return all of the data structures shindig supports?
I don't mind going through the code, but being able to see some actual
output would answer all my questions.

Chris

Re: bit of confusion over enums

Posted by Vincent Siveton <vi...@gmail.com>.
You could always use opensocial.Enum(), see enum.js

For json, see JsonPerson.constructEnum in jsonperson.js.

Cheers,

Vincent

2009/1/9, snacktime <sn...@gmail.com>:
> Is gender a special case?  I'm implementing a container using the shindig
>  javascript, and trying to figure out how to return values for enums.   Could
>  anyone give me a simple sample of the json to output for an enum?
>
>  Also while I'm here, what's the deal with formatted vs unstructured?  I
>  haven't looked at an rpc call to a shindig container returning the address
>  yet, but I did see that the person name is returned using formatted instead
>  of unstructured.
>
>  Alternatively, is there a container somewhere running shindig with a gadget
>  that makes rpc calls to return all of the data structures shindig supports?
>  I don't mind going through the code, but being able to see some actual
>  output would answer all my questions.
>
>  Chris
>