38209 nfJson

Provides a set of fast performance, reliable and easy to use Json functions using pure VFP.

Note: this project has moved to GitHub: https://github.com/VFPX/nfJson

vfpxreleasesmall.png Latest Release of nfJson ( source & examples )


Project Manager: Marco Plaza

Functions & Usage:

( Each function is a single prg - No additional dependencies / Requires VFP9 )
  • oJson = nfJsonRead(cJsonString , isFileName,lReviveCollections)
  • cJsonString = nfJsonCreate(oVfp, lFormattedOutput, lNoNullArrayItems,cRootName,aMembersFlag)
  • nfJsonToCursor(cJson, cCursorName , lForceImportFromArray) ( creates cursor back from Json created using nfCursorToJson4vfp )
  • nfCursorToJson4vfp() && converts current open table/cursor to Json suitable for later use of nfJsonToCursor()
  • nfCursorToJson(lReturnArray, lArrayofValues, lIncludestruct, lFormattedOutput) && converts current open table/cursor to Json
  • 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

Last edited May 24 at 9:27 PM by DougHennig, version 7

Comments

keshav1234 Feb 13 at 12:38 PM 
How to create JSON File from two cursor having one to many relationship.

mattslay Jul 13, 2016 at 5:23 AM 
Where can I download the No-Fox ? Is there a project home page somewhere?

mplazac Jul 12, 2016 at 4:08 PM 
Hi, this is a library I developed as part of No-Fox, a web server and MVC framework for VFP.

mattslay Jul 12, 2016 at 5:36 AM 
Hi - Can you please explain what the "nf" prefix stands for?