Hello! I have a question how to parse Library.ListOfObjects to JSON
I send post data like this from client using rest and want parse "templates", after save "codeForm","codeName" in database
{
"whoIs": "",
"templates": [{
"codeForm": "FORM_FIOGROUP",
"codeName": "operationDate",
"orderNumber": "1",
"codeFormat": "YYYY-MM-DD",
"header": "DATE",
"dbfFormatType": "Date",
"dbfFormatLength": "8",
"valueFrom": "Payment"
}, {
"codeForm": "FORM_FIOGROUP",
"codeName": "rrn",
"orderNumber": "2",
"codeFormat": "String",
"header": "REFERENCE",
"dbfFormatType": "String",
"dbfFormatLength": "25",
"valueFrom": "Payment"
}
]
}Hello!
How to set null in variable?
I need to create JSON like below:
{
"id":"1",
"Code": null
}
Hello everyone!
I have REST API and want check user with http header authorization,
When user input incorrect data refuse them with 401 unauthorized,
Question how to response with 401 unauthorized
Hello everyone!
I have had problem with XML format in Cache Object Script, it was diffucult to parse XML format,
So i decided to convert XML to JSON and parse json easily
So for that i wrote code in java which convert xml to json and build package with maven
Anyone interested can download jar file and see the instructions at the link:
Hello everyone!
Hello Everyone!
Following the example below i can download file only txt format, in other format(pdf,xls,rar) i have errors(can't open file),
So, how i will change code for download file in other format?
Thanks!
ClassMethod GetFile(file) As %String
{
#dim %request As %CSP.Request
set filename="E:\Rest\"_file
set %response.ContentType=..GetFileContentType($p(filename,".",*))
do %response.SetHeader("Content-Disposition","attachment;filename="""_$p(filename,"\",*)_"""")
Set %response.NoCharSetConvert=1
Set %response.Expires=50
set file=##class(%File).%New(filename)
do file
Hello!
How to delete archieve file, i'm used ##Class(%File).Delete(fileNamewithPath), but this method doesn't help,
Anybody know, how to delete file exactly?