I'm really sorry to be such a pain about this. But, all of the chasing around I've been doing to get DeserializeJson to work has caused Deserialize (which I had working) to now fail. Yesterday you helped me get Deserialize to work on a very simpe code example. After that, I had good success with Deserialize in the code I'm building. Now, Deserialize fails in the very last statement from the code from wwutils shown below. The error is that wwRegEx.prg does not exist.* wwUtils :: GetRegexObject
************************************************************************
* wwUtils :: GetwwRegexObject
****************************************
*** Function:
*** Assume:
*** Pass:
*** Return:
************************************************************************
FUNCTION GetwwRegexObject()
IF VARTYPE(__WWREGEX) != "O"
PUBLIC __WWREGEX
LOCAL lcRegEx
lcRegEx = "wwRegEx.prg"
__WWREGEX = NEWOBJECT("wwRegEx",lcRegEx)
What's the error?
If the Init() fails, then again it's most likely the missing wwipstuff.dll or wwdotnetbridge.dll in your FoxPro path. Both DLLs are best if they are in the current path.
+++ Rick ---
The code below still fails in DserializeJson
DO wwJsonSerializer && Load libs
DO wwDotnetBridge
loJson = CREATEOBJECT("wwJsonSerializer")
lcJson = '["Value,1","Value2. This \"is\" neat","Value3"]'
loResult =loJson.DeserializeJson(lcJson)
The failuer happens within "Init" in wwdotnetbridge with this IF statement.
*** Fail creation if the object couldn't be created
IF ISNULL(this.Load())
ERROR "Unable to load wwDotNetBridge: " + this.cErrorMsg
RETURN .F.
ENDIF
No. wwDotnetBridge does not get loaded by default.
But doing:
DO wwJsonSerializerDO wwDotnetBridge
somewhere to load the libraries is required.
+++ Rick ---
I see DeserializeJson() in the latest wwJsonSerializer.prg, but not in wwDotnetBridge.prg (dated Feb 3 in the zip file I downloaded yesterday).
After recompiling everything I could think of, I'm getting a different error - file GetwwDotnetBridge.prg does not exist. I see this is in wwDotNetBridge.prg. Shouldn't these routines be available by my starting up with "DO WWCLIENT"?
Make sure you recompile all of your files. Look in the help file for updating to the latest version or updating from the shareware version.
DeserializeJson() should be there ( you can double check the wwDotnetBridge.prg source file)...
+++ Rick ---
Yes, I am a registered user and downloaded all of the latest upates yesterday. I'm looking at the Help and trying to determine what needs to be loaded in advance of me calling DeserializeJson. I have the latest WCONNECT.H (file date Feb 3) in my base development folder and "DO wwclient" runs at when I start up in development.
... and only the very latest version that was released a couple of days ago. The shareware version has not been updated yet - it's only in the registered version at this point.
+++ Rick ---
I have the very latest wwIpstuff.dll, wwDotnetBridge.dll and NewtonSoft.Json.dll in the same folder as where I'm doing my development. However, the code below returns the error "Property DESERIALIZEJSON is not found". Can you let me know what I could be missing?
DO wwJsonSerializer && Load libs
loJson = CREATEOBJECT("wwJsonSerializer")
lcJson = '["Value,1","Value2. This \"is\" neat","Value3"]'
loResult =loJson.DeserializeJson(lcJson)