Loading ...
Sorry, an error occurred while loading the content.

92Re: JSON as a function parameter

Expand Messages
  • George
    Aug 20, 2005
    • 0 Attachment
      That is valid javascript code, as pointed out already, object literals.

      You can also create the object first, then pass it to the method:

      args = {type:"My Type", name:null, rev:3, doThis:true};
      obj.init(args);


      --- In json@yahoogroups.com, "TCQ" <despam2004@y...> wrote:
      >
      > before:
      > . obj.init(
      > . . "My Type","My Name","n",true, false...
      > . )
      >
      > after:
      > . obj.init({
      > . . type: "My Type", name: "My Name", rev: "n", doThis: true, doThat:
      > false...
      > . })
      >
    • Show all 4 messages in this topic