Quantcast
Channel: VFPX
Viewing all articles
Browse latest Browse all 3798

Updated Release: nfJson (Aug 20, 2016)

$
0
0
2016/08/16:
nfJsonPerfTest:
added compiled exe
samples file ships as a separate file for you to edit
fixed bug on test prgs:
clean installs would fail due to missing temp folder on ditribution zip w/o tests\temp folder
fixed bug on collectionTest

2016/07/22:
nfJsonRead: Improved error management
CollectionTest: added new test

2016/07/20:
  • Fixed bug: missing closing curly brace on collections as object member
  • Updated collections program test

2016/07/09:
  • Automatic cast for datetime properties ( ISO-8601 basic format & vfp compilant as described on https://en.wikipedia.org/wiki/ISO_8601#Times. )
  • nfJsonToCursor Bug Fix: "Date/datetime evaluated to an invalid value" while running under "strictdate = 1" converting empty dates back from Json

2016/07/04:
  • Added support for control characters encoding ( chr( 0) ~ chr(31) )

2016/05/05:
  • invalid Json error shows calling program information

2016/04/02:
  • complex nested objects/arrays validation
  • missing object/array closures validation

2016/03/28:
  • nfJsonRead performs JSON validation: invalid Json throws error indicating reason.
  • nfJsonPerfTest: proper error management enabled for invalid Json input from clipboard
  • nfJsonToCursor: use of strict date format

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

Viewing all articles
Browse latest Browse all 3798

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>