New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSON (") quote issue!!! #1781
Comments
Resolved - JSON (") quote issue!!! vitmalina#1781
any one please help... |
my solution is not working, can you please help on this issue #1781 |
have you tried escaping the quote? in your sql: |
@KirillBorunov okay I will try.... thanks for comment. |
Well, your code is not valid JSON. It is out of the scope of the w2ui project to write your C# backend code. Closing issue: not a w2ui issue |
Can you please help.
This is my object created by c# code based on SQL data.
{
"RowId": 4533,
"PriorityID": 11,
"Priority_Description": "Exceeded PG WD 11+ where Clock has not stopped",
"PrioritySort": 13000,
"Include": false,
"UnitID": 82,
"Unit": "PI",
"AuditDate": "/Date(1493700221290)/",
"AuditUser": "MS\jdean9",
"RuleStartDate": "/Date(1527828900000)/",
"RuleEndDate": "/Date(1528869600000)/",
"w2ui": "{"style": "background-color:#FFC7CE;color:#9C0006"}",
"IsExpire": false,
"CreatedBy": null,
"CreatedOn": null,
"ModifiedBy": null,
"ModifiedOn": null,
"recid": 4533,
"RuleStartDate_": null,
"RuleEndDate_": null
}
in this object w2ui property is bind in side (") quote.
If i will remove this quote then, this is showing error in my sql query.
how to resolve this issue?
SQL Query
SELECT
A.UID as RowId,A.PriorityID,B.Priority_Description,
A.PrioritySort,
CAST(IIF(A.[Include]=0,0,1) as bit) as [Include],A.UnitID,C.Unit,
A.AuditDate,A.AuditUser,
A.RuleStartDate,
A.RuleEndDate,
IIF(IsExpire=0, '{"style": "background-color:#FFC7CE;color:#9C0006"}' ,null) as w2ui,
A.IsExpire,
A.CreatedBy,
A.CreatedOn,
A.ModifiedBy,
A.ModifiedOn
FROM
[dbo].[T_CPSMasterInventory_Priority_By_Unit] A
INNER JOIN [dbo].[T_CPSMasterInventory_Priority] B
ON A.PriorityID=B.PriorityID
INNER JOIN [dbo].[T_UNIT_ID] C
ON C.UNITID=A.UnitID
AND C.Unit='PI'
The text was updated successfully, but these errors were encountered: