%ListOfDataTypes from JSON
Hello...
I need to convert a array (JSON) in a List Of String. I think, there is some method that does it directly.
Something like that:
SAMPLES>set list = ##class(%ListOfDataTypes).$fromJSON("[""a"",""b"",""c""]")
%FromObject+21^%Library.RegisteredObject.1 *%Exception.General Compose Compose %FromObject Unable to map frm %Library.Array instance to %Library.ListOfDataTypesI have reading about this but I don't found some trick to help me.
https://community.intersystems.com/post/how-convert-json-listofdatatypes
Thanks!!
Discussion (1)0
Comments
#dim list As %ListOfDataTypes
d ##class(%ZEN.Auxiliary.jsonProvider).%ConvertJSONToObject("[""a"",""b"",""c""]",,.list)
w list.Count(),!