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

RE: [json] Re: json date time objects

Expand Messages
  • Mert Sakarya
    You can write any date data as a string in a JSON document, then if you are using Java, C# or Javascript (or any other), you can use that language s, DateTime
    Message 1 of 6 , Jul 11, 2007
    • 0 Attachment
      You can write any date data as a string in a JSON document, then if you are using Java, C# or Javascript (or any other), you can use that language's, DateTime functions to convert.


      To: json@yahoogroups.comFrom: prasannarupan@...: Thu, 12 Jul 2007 05:10:15 +0000Subject: [json] Re: json date time objects




      Does this mean that Date objects created using new Date() can be directly mapped to Java Objects? Can the date object created this way be formatted into different date time formats?please let me knowThanks--- In json@yahoogroups.com, "brucehub33" <bruce.hubbard33@...> wrote:>> --- In json@yahoogroups.com, "rkmr.em@" <rkmr.em@> wrote:> >> > Does JSON support a datetime object?> > > > thanks> > > > > > [Non-text portions of this message have been removed]> >> you can put whole functions in a json object if you like. So in short > yes just make a new Date() object within you JSON object.>


      _________________________________________________________________
      Don't get caught with egg on your face. Play Chicktionary!  
      http://club.live.com/chicktionary.aspx?icid=chick_wlmailtextlink

      [Non-text portions of this message have been removed]
    • Stephen M. McKamey
      Basically Dates are encoded as ISO 8601 strings by default (but this can be customized), and a hook or callback function allows you to deserialize them (or
      Message 2 of 6 , Jul 12, 2007
      • 0 Attachment
        Basically Dates are encoded as ISO 8601 strings by default (but this
        can be customized), and a "hook" or callback function allows you to
        deserialize them (or any other node for that matter) during parseJSON.

        Functions are strictly not allowed in JSON as they are potentially
        meaningless to other languages as well as a potential security risks.

        There has also be some debates about Dates a couple of times before,
        which resulted in the above solution. Check out some of these threads
        for more info:

        http://tech.groups.yahoo.com/group/json/message/600
        http://tech.groups.yahoo.com/group/json/message/607
        http://tech.groups.yahoo.com/group/json/message/554
        http://tech.groups.yahoo.com/group/json/message/518

        --- In json@yahoogroups.com, Mert Sakarya <mertsakarya@...> wrote:
        >
        > You can write any date data as a string in a JSON document, then if
        you are using Java, C# or Javascript (or any other), you can use that
        language's, DateTime functions to convert.
        >
        >
        > To: json@...: prasannarupan@...: Thu, 12 Jul 2007 05:10:15
        +0000Subject: [json] Re: json date time objects
        >
        >
        >
        >
        > Does this mean that Date objects created using new Date() can be
        directly mapped to Java Objects? Can the date object created this way
        be formatted into different date time formats?please let me
        knowThanks--- In json@yahoogroups.com, "brucehub33"
        <bruce.hubbard33@> wrote:>> --- In json@yahoogroups.com, "rkmr.em@"
        <rkmr.em@> wrote:> >> > Does JSON support a datetime object?> > > >
        thanks> > > > > > [Non-text portions of this message have been
        removed]> >> you can put whole functions in a json object if you
        like. So in short > yes just make a new Date() object within you JSON
        object.>
        >
        >
        > _________________________________________________________________
        > Don't get caught with egg on your face. Play Chicktionary!  
        > http://club.live.com/chicktionary.aspx?icid=chick_wlmailtextlink
        >
        > [Non-text portions of this message have been removed]
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.