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

973Re: [json] Parsing JSON with VBA?

Expand Messages
  • Gaetano Giunta
    Apr 4 6:18 AM
    • 0 Attachment
      a bit out of scope, but carefully written javascript libraries can all
      be used this way. And there should be a lot that support json via eg.
      regexps (if plain eval sounds too insecure)

      Gaetano


      > The fastest way to get started would be to load the JScript (MS's
      > JavaScript engine) and get it to parse the JSON, like this:
      >
      > Set sc = CreateObject("ScriptControl")
      > sc.Language = "JScript"
      > json = "{""x"":10,""y"":15}"
      > Set o = sc.Eval("(" + json + ")")
      > ? o.x, o.y
      > 10 15
      >
      > You can just fire up Excel or Word and try the above code out in the
      > VBA IDE's immediate window.
      >
      > Hope this helps,
      > Atif
      >
      > From: json@yahoogroups.com <mailto:json%40yahoogroups.com>
      > [mailto:json@yahoogroups.com <mailto:json%40yahoogroups.com>] On
      > Behalf Of Bill Guindon
      > Sent: Friday, April 04, 2008 5:37 AM
      > To: json@yahoogroups.com <mailto:json%40yahoogroups.com>
      > Subject: [json] Parsing JSON with VBA?
      >
      > I'm looking for a script/example/library written in VBA to parse JSON
      > data. I didn't see one on json.org, and have had little luck with
      > Google searches. Anybody know of one?
      >
      > If nothing else, the next VBA guy will at least find a hit when
      > searching this group.
      >
      > Thanks, in advance, for any help/pointers.
      > --
      > Bill Guindon (aka aGorilla)
      > The best answer to most questions is "it depends".
      >
      > [Non-text portions of this message have been removed]
      >
      >



      [Non-text portions of this message have been removed]
    • Show all 6 messages in this topic