Krishnaveni Kapu · May 13, 2024 go to post

I have below issue -

I have an ID with 123456.(ID as a dynamic value coming from request message)

I wanted it to be displayed as "123456" in Json Stream.

Code Example:

set object = ##class(%ZEN.proxyObject).%New()

set object.ID = ID

set x = ##class(%ZEN.Auxiliary.jsonArrayProvider).%WriteJSONStreamFromObject(.json,object)

Case:1
ID : 123456

Will output:

{

 "ID": 123456

but I need :

{

 "ID": "123456"

}

Case:2
ID : "123456" (adding double quotes)

Will output:

{

 "ID":  "\"123456\""

but I need :

{

 "ID": "123456"

Thanks in advance.

Krishnaveni Kapu · Apr 26, 2024 go to post

It is working now 

my XML :

<Input>
   <data>      
         <Id>
            <Type>A</Type>
            <Value>123</Value>
         </Id>         
   </data>
</Input>

 need to use -->  Document.data.Id

Krishnaveni Kapu · Apr 26, 2024 go to post

Thanks for your reply.

I wants to read in a routing rule when condition.(not in a class method)

Krishnaveni Kapu · Apr 26, 2024 go to post

Document.{/dasta/is/ip/lo/loi/@material}

What is "Document" here ? parent tag of xml ?

Actually I am looking for syntax to read through XML input in my routing rule ..

Used something like this - 

but its not working ?

Krishnaveni Kapu · Jun 20, 2023 go to post

Its resolved :

..ConvertDateTime("09/Jun/23 09:40:00 BST","%d/%b/%y %H:%M:%S BST","%Y%m%d%H%M%S")    

output = 20230609094000