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

95Re: JSON C# Parser

Expand Messages
  • Atif Aziz
    Aug 23, 2005
      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
      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
      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
      haven't gotten around to it. If you're interested in having a look
      it sooner, please e-mail me and I can send the implementation to you

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

      --- In json@yahoogroups.com, Michael Schwarz <michael.schwarz@g...>
      > 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
      > 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
      > Has anyone developed such a parser already or is working on it?
      > CIAO
      > Michael
    • Show all 2 messages in this topic