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

453RE: [json] JSON representation of common types

Expand Messages
  • Atif Aziz
    Jul 11, 2006
    • 0 Attachment
      I think you'll have a hard time getting input on standardization of DataSets because most folks who are not familiar with .NET Framework may have no clue what's being talked about. The DataSet type and concept carries a lot of structural and behavioral baggage with it. Unless one defines the general problem (without referring to library-specific types) that needs to be addressed and then keep the focus on the wire format, it's a lost cause. The DataSet is specific to the .NET Framework and what's mostly interesting about it is all the richness it provides to give nearly the sense of a disconnected database (short of stored procedures and a query language unless XPath cuts it for your case). Since JSON is not about behavior, one has to focus on the structure and the wire format. The behavior can be defined only through an abstract specification that defines a processing model for each end of the wire that wants to interoperate on that data. And, mind you, the more you put in there, the more behavior each party has to provide. For example, if you're going to ship over a DataSet in JSON to a Java application, then who's going through the trouble of making sure that something on the Java or JavaScript side can provide all the expected functionality, like producing updategrams when calling back into the server? Don't get me wrong. There's an interesting problem domain behind it all that's interesting to try and standardize, but I fear that it might be a bit out of scope for this group.



      ________________________________

      From: json@yahoogroups.com [mailto:json@yahoogroups.com] On Behalf Of 2
      Sent: Tuesday, July 11, 2006 6:10 PM
      To: json@yahoogroups.com
      Subject: RE: [json] JSON representation of common types



      Good question.

      Unless I'm mistaken a Dictionary is pretty much an associative array, which
      will follow the pattern of: {key:value,key:value,key:value}, and Lists will
      just be arrays [value,value,value]

      I know there is no standard for DataSet or DateTime. I started a thread
      about a DataSet standard and got some good feedback on the way people like
      to see them, but I didn't really get a strong sense of urgency about the
      subject of standardizing them. You can check out the thread here:
      http://groups.yahoo.com/group/json/message/436 <http://groups.yahoo.com/group/json/message/436>

      As for DateTime, again there is no formal standard other then just returning
      your data in a format that can be considered a date by both languages you
      are developing for (let's say C# and JavaScript).

      I personally feel that JSON would benefit greatly from standardizing
      DataSets and DateTime values so that as a developer, I know I can
      deserialize ANY value and know how to use it, without worrying about what
      serializer was used.

      Hope that helps,

      -Todd

      _____

      From: json@yahoogroups.com <mailto:json%40yahoogroups.com> [mailto:json@yahoogroups.com <mailto:json%40yahoogroups.com> ] On Behalf Of
      Michael Schwarz
      Sent: Tuesday, July 11, 2006 7:36 AM
      To: json@yahoogroups.com <mailto:json%40yahoogroups.com>
      Subject: [json] JSON representation of common types

      Hi,

      I'd like to know if there are already some common representations of
      common types like following .NET data types:

      - DataSet, DataTable
      - Dictionary
      - List, Collection
      - DateTime -> sometimes handeled as "new Date(...)" or maybe the
      SortablePattern string representation

      --
      Best regards | Schöne Grüße
      Michael

      Microsoft MVP - Most Valuable Professional
      Microsoft MCAD - Certified Application Developer

      http://weblogs. <http://weblogs.asp.net/mschwarz/ <http://weblogs.asp.net/mschwarz/> > asp.net/mschwarz/
      http://www.schwarz- <http://www.schwarz-interactive.de/ <http://www.schwarz-interactive.de/> > interactive.de/
      mailto:info@schwarz- <mailto:info%40schwarz-interactive.de> interactive.de

      [Non-text portions of this message have been removed]



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