JSON Parser in Omnis Code / Studio 4.3.2.1 Non-Unicode
Hi Rudolf,
Not sure what your end goal is… But I use the following to pick data out
of JASON text. Requires pre-knowledge of what you are looking for.
lvResponseText is the data received back from a POST or GET call to a Web
Service.
Do method ——getJASONtag (‘”caseID”‘,lvResponseText) Returns pvCaseNo
; Get JASON tag value
Calculate lvText as mid(pvText,pos(pvTag,pvText),len(pvText))
Calculate lvText as mid(lvText,1,pos(‘}’,lvText))
Calculate lvText as mid(lvText,pos(‘:’,lvText)+1,len(lvText))
If pos(‘,’,lvText)>0
Calculate lvText as mid(lvText,1,pos(‘,’,lvText)-1)
Else
Calculate lvText as mid(lvText,1,pos(‘}’,lvText)-1)
End If
Calculate lvText as replaceall(lvText,kDq,”)
Quit method lvText
*********************************************************************
Michael Mantkowski
ClienTrax Software
1-614-875-2245
*********************************************************************
—–Original Message—–
From: omnisdev-en [mailto:omnisdev-en-bounces@lists.omnis-dev.com] On Behalf
Of Rudolf Bargholz
Sent: Monday, October 30, 2017 5:55 AM
To: ‘OmnisDev List – English’ <omnisdev-en@lists.omnis-dev.com>
Subject: JSON Parser in Omnis Code / Studio 4.3.2.1 Non-Unicode
Hi,
Has anyone written a simple Omnis JSON parser in Omnis code that they might
be willing to share? I just need to take apart some JSON, performance is not
really an issue, an Omnis Upgrade to a newer version of Omnis is not
possible, so it would have to be in native Omnis Studio code.
I have an idea how to do this, but if I someone has done this already, and
is willing to share their code, it would save me some time.
Regards
Rudolf
_____________________________________________________________
Manage your list subscriptions at lists.omnis-dev.com
_____________________________________________________________
Manage your list subscriptions at lists.omnis-dev.com