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

133parser assistance

Expand Messages
  • MPCM
    Dec 16, 2005
      I have been using JSON in several web projects via javascript and PHP,
      it is truly a great format and lets us developers focus on apps. I am
      trying write a parser for JSON, at least to handle the data formats in
      basic, specifically visual basic. Doing a json encode routine is
      fairly straight forward (ignoring the fact that vb data types for
      named arrays (objects) is less than ideal).

      I've looked over the code in other languages, and I am looking for
      some guidance from someone a smarter than me in this. I understand the
      basics of parsing/tokenizing, and the lack of an included regexp
      ability in vb6 makes this difficult. My goal is to have a vb6 working
      parser without external dll/references. including a script engine is
      also not really an option, again the goal is for a raw vb6 parser.

      The way I was looking at this was to read it char by char and, as it
      detected each possible data type/set/nest, strip out the inferred
      closing chars on the end, and pass that sub string and a current
      position in the existing object to the same routine, letting it
      recursively call itself to do the parsing.

      Every time I have headed down this path, it starts to get somewhat
      complex, and I keep feeling like I am doing this the `wrong` way, the
      code just seems like too much of a hack. Any suggests insight, code,
      or pseudo code covering concepts on dealing with this would be much

    • Show all 3 messages in this topic