AnantLabs / aspjson

Automatically exported from code.google.com/p/aspjson
0 stars 0 forks source link

double quotation mark missing when using QueryToJSON #26

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. executing : QueryToJSON(dbconn, "SELECT name, surname FROM members WHERE age 
< 30").Flush

into an asp page

my own select is actually :
Select CategoryID as id, Description as value from Categories WHERE Description 
Like '%a%'

What is the expected output? What do you see instead?
The json data generated is :
[{"id":1,"value":"Soft drinks, coffees, teas, beers, and 
ales"},{"id":2,"value":"Sweet and savory sauces, relishes, spreads, and 
seasonings"},{"id":3,"value":"Desserts, candies, and sweet 
breads"},{"id":5,"value":"Breads, crackers, pasta, and 
cereal"},{"id":6,"value":"Prepared meats"},{"id":7,"value":"Dried fruit and 
bean curd"},{"id":8,"value":"Seaweed and fish"}]

The value of id is 1 instead of "1"
the double quotation mark is missing
What version of the product are you using? On what operating system?

<!--#INCLUDE VIRTUAL="includes/JSON_2.0.4.asp"-->
<!--#INCLUDE VIRTUAL="includes/JSON_UTIL_0.1.1.asp"-->

Please provide any additional information below.

see source3.asp attached the script use the database is sample database 
'Northwind' provided by ms-sql 2k

delaunay@free.fr

Original issue reported on code.google.com by philippe...@gmail.com on 25 Aug 2012 at 2:08

Attachments:

GoogleCodeExporter commented 9 years ago
Typically, the id in a record is usually an number (often integer, auto 
increment).  
Numbers are not typically wrapped in quotes.
Please reference http://www.json.org/

Original comment by IntenseT...@gmail.com on 10 Sep 2012 at 11:01

GoogleCodeExporter commented 9 years ago

Original comment by tugrulto...@gmail.com on 10 Sep 2012 at 11:24