On Fri, 01 Apr 2011, Patrick Mast, xHarbour.com Inc. wrote: Hi Patrick,
> Was thinking.. If we change hb_jsonencode() to also use Date's, will > the output than be JSon compatible? I mean, I need to be able to read > the JSon string with another language that supports JSon strings. > Any thoughts? ;-) JSON format does not support dates and timestamp values. So when you pass date item to be converted to JSON format we have 3 choices: 1. generate RTE 2. convert date to some other format, accepted by JSON, i.e. "YYYYMMDD" strings 3. store it as NIL/NULL value. Mindaugas chose 2-nd version and xHarbour uses Mindaugas code. It means that all dates encoded to JSON format and then decoded are shown as strings in YYYYMMDD format. If you do not like it then you can change JSON serialize code and chose 1-st or 3-rd action when someone tries to serialize date value. best regards, Przemek ------------------------------------------------------------------------------ Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf _______________________________________________ xHarbour-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/xharbour-developers

