Hi Rick,
I'm new to JSON and I'm trying to get my head around serialize and deserialize but I've hit an issue.
My test code to reproduce this error is as follows :
&& The JSON below was pre-captured from my webpage for testing
lcParms = "data%5B0%5D%5Burn%5D=1000&data%5B0%5D%5Bcat%5D=Test123ID&data%5B0%5D%5Bdes%5D=TestProductDes&action=create"
do wwJsonSerializer
oJSON = CREATEOBJECT("wwJsonSerializer")
lcJSON = oJSON.DeserializeJson(lcParms)
But, on the last line I get this error :
Could not load file or assembly 'Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.
In my 'webapp_main.prg' I have added set procedure to wwDotnetBridge and wwJsonSerializer with Addi
I have .NET 4.8 installed.
And I have checked the following files are in the 'deploy' folder : 'newtonsoft.dll' 'wwdotnetbridge.dll' 'wwipstuff.dll'
I assume I'm missing something else here, but I'm not sure what, could you kindly point me in the right direction?
Regards, Chris
Uh, that isn't... JSON?
The data is UrlEncoded() and if unencoded it still isn't JSON. It looks like some strang PHP data structures.
This seems to work:
DO wwutils && load libs
lcData = UrlDecode("data%5B0%5D%5Burn%5D=1000&data%5B0%5D%5Bcat%5D=Test123ID&data%5B0%5D%5Bdes%5D=TestProductDes&action=create")
? lcData
? GetUrlEncodedKey(lcData,"data[0][urn]")
+++ Rick ---