Please try below, you should be able to read all json content. This works !
set oref = ##class(%Stream.GlobalCharacter).%New()
do oref.Write(newMsg) // where newMsg contains JSON stream
$$$LOGINFO("JSON = " _oref.Read())
You can also read only certain number of characters from json, for more understanding please go through below intersystems documentation Reading and Writing Stream Data
Extend your Message class with either Extends (%RegisteredObject, %JSON.Adaptor, %XML.Adaptor) or Extends (%Persistent, %XML.Adaptor, %JSON.Adaptor) .If your schemas line up then you can use below command to convert your message to json.
set tSC = tMessageObject.%JSONExportToString(.jsonEvent)
go to post
Hi,
Try below command, this will give you the output in YYYYMMDDHHMM format.
Thanks,
Anusri
go to post
Hi,
Please try below, you should be able to read all json content. This works !
You can also read only certain number of characters from json, for more understanding please go through below intersystems documentation Reading and Writing Stream Data
Thanks,
Anusri
go to post
Hello,
Please try below, this should help you !
write $zstrip($zdatetime($horolog, 3), "*pw")
Output : 20220127113314
write $zstrip($zdatetime($horolog, 3), "*p")
Output : 20220127113314
You can use either of the above two , both works !
Thanks,
Anusri
go to post
Extend your Message class with either Extends (%RegisteredObject, %JSON.Adaptor, %XML.Adaptor) or Extends (%Persistent, %XML.Adaptor, %JSON.Adaptor) .If your schemas line up then you can use below command to convert your message to json.
set tSC = tMessageObject.%JSONExportToString(.jsonEvent)
go to post
Informative ! Thanks for sharing !