User bio
404 bio not found
Member since May 20, 2023
Replies:

Hi,

Here is the sample code

 Set DCJson= {"name":"Janko","surname":"Hrasko","colors":["blue","green","yellow"]}
  
  Set formatter=##class(%JSON.Formatter).%New()
  Set sc=formatter.FormatToString(DCJson,.tJsonStr)
  Set newMsg = ##class(Ens.StreamContainer).%New()
  Set newMsg.Stream = ##class(%Stream.GlobalCharacter).%New()
  do newMsg.Stream.Write(tJsonStr)
  newMsg.Stream.Read()
 

Output:

{
  "name":"Janko",
  "surname":"Hrasko",
  "colors":[
    "blue",
    "green",
    "yellow"
  ]
}

Thanks,

Certifications & Credly badges:
Prasanth has no Certifications & Credly badges yet.
Global Masters badges:
Followers:
Following: