>> 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.

We could also consider a 4th choice, I.e. when converting date to string in 
the wrapper add extra flag to the string such that when it is decoded the 
wrapper will again convert the JSON decoded string to a date value. This of 
course means that the string coded by JSON will read something like:

   {DATE}YYYYMMDD

and it will therefore not be usable by other JSON decoders unless they 
expect such convention.

Ron 


------------------------------------------------------------------------------
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

Reply via email to