rcdmk / aspJSON

A fast classic ASP JSON parser and encoder for easy JSON manipulation to work with the new JavaScript MV* libraries and frameworks.
MIT License
203 stars 89 forks source link

Bad Data For Date #66

Closed smkoder closed 6 years ago

smkoder commented 6 years ago

When writing an object containing a date, it results in bad JSON data (missing closing quotation after the date)

For example, if I have the following simple ASP code:

` set json = new JSONobject set rs = Server.CreateObject("ADODB.recordset") query = "SELECT getdate() AS now_date"

set rs = Server.CreateObject("ADODB.recordset")
rs.Open query, conn
json.add "now_date", rs("now_date")
rs.Close
json.Write()

`

The following gets written to the stream:

{"now_date":"2018-04-17T01:25:17}

Line 697 in version 3.7.0 needs to be updated to add the closing quote to the output

greydmar commented 6 years ago

I´ve found same problem. Closing quotes resolved that issue

rcdmk commented 6 years ago

Hello!

Thanks for notifying me. I'll get back to this project in this weekend.

rcdmk commented 6 years ago

Also, feel free to open pull requests to the development branch if you want to. This way I can review and integrate changes fast and you will be listed in the contributors list.

rcdmk commented 6 years ago

Fixed in new version 3.8.0.