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

Re: JSON C# Parser

Expand Messages
  • Atif Aziz
    Hi Michael, I have written such a parser in C#. The parser is an adaption of the JSONTokener port available from Douglas Crockford s web site [1]. I have
    Message 1 of 2 , Aug 23, 2005
    View Source
    • 0 Attachment
      Hi Michael,

      I have written such a parser in C#. The parser is an adaption of the
      JSONTokener port available from Douglas Crockford's web site [1]. I
      have re-factored the JSONTokener, JSONArray and JSONObject classes
      to
      be slightly more de-coupled with the eventual goal of allowing the
      caller to dictate the object hierarchy that is deserialized by the
      parser. In essence, the parser now works with an AST (Abstract
      Syntax
      Tree) strategy that can be implemented by anyone. The default
      implementation, of course, simply deserializes into JSONObject and
      JSONArray instances but that's precisely what can be changed now. I
      have also a JSON writer implementation that does the converse. It
      provides an AST interface and emits JSON as text. The advantage of
      this approach is that you can even (for some odd reason) emit an XML
      or binary of the JSON AST. Just one problem...you've just caught me
      right before the point I was going to find a home for the sources
      but
      haven't gotten around to it. If you're interested in having a look
      at
      it sooner, please e-mail me and I can send the implementation to you
      directly.

      [1] http://www.crockford.com/JSON/cs/

      --- In json@yahoogroups.com, Michael Schwarz <michael.schwarz@g...>
      wrote:
      > Hello,
      >
      > I will first introduce myself: I'm the author of the Ajax.NET
      > (http://ajax.schwarz-interactive.de/ or
      > http://weblogs.asp.net/mschwarz/) and using JSON to transport
      objects
      > from server-side .NET code to JavaScript.
      >
      > Currently I'm working on a parser (or converter) that will
      create .NET
      > objects on the server-side from a JSON string. I had a look at the
      > JSON parser at http://www.json.org/ but ran into different
      problems.
      > Has anyone developed such a parser already or is working on it?
      >
      > CIAO
      > Michael
    Your message has been successfully submitted and would be delivered to recipients shortly.