Errr actually Jocko the quotes are required, they're especially
important if you try to use a "key" that is a reserved word (such as
"function").

    http://json.org/

Yes Frank, what you wrote is a correct JSON object.

Karl Rudd

On 10/17/07, Jocko <[EMAIL PROTECTED]> wrote:
>
> Frank,
>
> The proper form would be:
>
> {
>    ads: true,
>    content_slug: "just-some-title"
> }
>
> The JSON format indicated a name/value pair, and the name is treated
> as a property/method of the base class.  The quoting would not work
> effectively.  To expand the concept:
>
> var baseclass = {
>    ads: true,
>    content_slug: "just-some-title"
> };
>
> alert(baseclass.context_slug);
>
> This pop's up an alert box with the message "just-some-title"
>
> If you want to use a quoted identifier to generate the same object,
> you would do the following:
>
> var baseclass = {};
>
> baseclass["ads"] = true;
> baseclass["context_slug"] = "just-some-title"
>
>
> Jocko
>
>
> Frank Peterson wrote:
> > [
> > {
> > "ads": true,
> > "content_slug": "just-some-title"
> > }
> > ]
>
>

Reply via email to