[progress Communities] [progress Openedge Abl] Forum Post: Re: Jsonobject:gettype() What...

  • Thread starter Thread starter Peter Judge
  • Start date Start date
Status
Not open for further replies.
P

Peter Judge

Guest
Compare the results of GetType() to the values in the Progress.Json.ObjectModel.JsonDataType enum class. The values basically are enum OpenEdge.Core.JsonDataTypeEnum : define enum String = 1 /* = JsonDataType:STRING */ Number /* = 2 = JsonDataType:NUMBER */ Boolean /* = 3 = JsonDataType:BOOLEAN */ Object /* = 4 = JsonDataType:OBJECT */ Array /* = 5 = JsonDataType:ARRAY */ Null /* = 6 = JsonDataType:NULL */ . end enum . You can display names with some tapdancing …. Def var enumDataType as JsonDataTypeEnum. Def var intDataType as int. intDataType = someJsonData:GetType(“Person”). enumDataType = JsonDataTypeEnum:GetEnum(intDataType). Message “Person is a “ string(enumDataType). // Person is a String

Continue reading...
 
Status
Not open for further replies.
Back
Top