Included Functions & Simple Usage:
( Each function is a single prg - No additional dependencies / Requires VFP9 )- oJson = nfJsonRead(cJsonString , isFileName,lReviveCollections)
- cJsonString = nfJsonCreate(oVfp, lFormattedOutput, lNoNullArrayItems,cRootName)
- nfJsonToCursor(cJson, cCursorName , lForceImportFromArray)
- nfCursorToJson4vfp()&& calls nfCursorToJson with options set to create Json for later convert back to cursor in Vfp using nfJsonToCursor()
- nfCursorToJson(lReturnArray, lArrayofValues, lIncludestruct, lFormattedOutput)
- nfCursorToObject(lCopyToArray, lIncludeStruct)
Tests & Sample files:
- nfJsonPerfTest.prg: just run it and choose one of the embedded json samples from the list to check performance on your pc. ( Allows you to parse Json from clipboard too. )
- examples.prg will parse the next Json files included in JsonSamples folder. just run from test folder and see sample code and output.
- collectionTest.prg: creates a complex collection , converts it to Json and back to vfp.
- Sample Json files included:
- youtubesearch.json
- cycloneForecast.json
- dropbox.json
- googleMapsDistance.json
- iphone photo.json
- mapquest.json
- mySimpleArray.json
- tweeter.json
- weatherService.json
- yahooweather.json
( Documentation is on the way )
Any questions please use the discussions section.