All Projects → VFPX → nfJson

VFPX / nfJson

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

Programming Languages

xBase
55 projects

Projects that are alternatives of or similar to nfJson

Hideit.sh
Automagically hide/show a window by its name when the cursor is within a defined region or you mouse over it.
Stars: ✭ 171 (+327.5%)
Mutual labels:  cursor
dbase
Library for processing dbase / xbase / dbf database files
Stars: ✭ 29 (-27.5%)
Mutual labels:  foxpro
Kursor
Cursor style with javascript and css
Stars: ✭ 140 (+250%)
Mutual labels:  cursor
Cursors
All available cursors
Stars: ✭ 188 (+370%)
Mutual labels:  cursor
dbf-to-sqlite
CLI tool for converting DBF files (dBase, FoxPro etc) to SQLite
Stars: ✭ 31 (-22.5%)
Mutual labels:  foxpro
AndroidEasySQL-Library
An Easier & Lazier approach to SQL database for Android
Stars: ✭ 28 (-30%)
Mutual labels:  cursor
React Cursor Position
A React component that decorates its children with mouse and touch coordinates relative to itself.
Stars: ✭ 136 (+240%)
Mutual labels:  cursor
immutable-cursor
👊 Immutable cursors incorporating the Immutable.js interface over a Clojure-inspired atom
Stars: ✭ 58 (+45%)
Mutual labels:  cursor
dbf2sql
DBF 2 SQL is small command line tool for converting DBF files to MySQL dump format.
Stars: ✭ 12 (-70%)
Mutual labels:  foxpro
SQLiteHelper
🗄 This project comes in handy when you want to write a sql statement easily and smarter.
Stars: ✭ 57 (+42.5%)
Mutual labels:  cursor
Nedb Promises
A dead-simple promise wrapper for nedb.
Stars: ✭ 190 (+375%)
Mutual labels:  cursor
Unclutter Xfixes
A rewrite of unclutter using the x11-xfixes extension
Stars: ✭ 236 (+490%)
Mutual labels:  cursor
foxpages
Visual FoxPro Multithread Web Server
Stars: ✭ 22 (-45%)
Mutual labels:  foxpro
Smos
A comprehensive self-management System
Stars: ✭ 179 (+347.5%)
Mutual labels:  cursor
go-foxpro-dbf
Golang package for reading XBase FoxPro DBF/FPT files
Stars: ✭ 59 (+47.5%)
Mutual labels:  foxpro
Metago
MetaGo provides fast cursor movement/selection for keyboard focused users in vscode
Stars: ✭ 151 (+277.5%)
Mutual labels:  cursor
FoxBarcode
A 100% Visual FoxPro class that provides a tool for generating images with different bar code symbologies to be used in VFP forms and reports, or exported to other applications
Stars: ✭ 31 (-22.5%)
Mutual labels:  vfp
mongoose-aggregate-paginate-v2
A cursor based custom aggregate pagination library for Mongoose with customizable labels.
Stars: ✭ 103 (+157.5%)
Mutual labels:  cursor
FoxBarcodeQR
FoxBarcodeQR is a supplement of FoxBarcode class only for QR Code barcodes. This class is an alternative solution for all developers who requested QR Code support.
Stars: ✭ 20 (-50%)
Mutual labels:  vfp
Sublime-Text-2-Syntax-Coloring-for-Visual-FoxPro
Sublime Text 2 Syntax Coloring for Visual FoxPro
Stars: ✭ 17 (-57.5%)
Mutual labels:  vfp

nfJson

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

Project Manager: Marco Plaza

Functions & Usage

( Each function is a single prg - No additional dependencies / Requires VFP9 )

  • oJson = nfJsonRead(cJsonString , isFileName,lReviveCollections)
    Example :
    jsonstr = '{"name":"John", "age":30, "family":{"wife":"Susana","son":"Tom"}, "location":"texas"}'
    vfpobj = nfJsonRead(jsonstr)
    ? vfpobj.age &&will show 30
    ? vfpobj.family.son &&will show Tom

  • cJsonString = nfJsonCreate(oVfp, lFormattedOutput, lNoNullArrayItems,cRootName,aMembersFlag)

  • nfJsonToCursor(cJson, cCursorName , lForceImportFromArray) ( creates cursor back from Json created using nfCursorToJson4vfp )

  • cJsonString = nfCursorToJson4vfp() && converts current open table/cursor to Json suitable for later use of nfJsonToCursor()

  • cJsonString = nfCursorToJson(lReturnArray, lArrayofValues, lIncludestruct, lFormattedOutput) converts current open table/cursor to Json

  • oJson = nfCursorToObject(lCopyToArray, lIncludeStruct)

  • cJsonString = jsonFormat( cJsonStr )* Format json string w/o validate or change element positions

  • nfOpenJson(** cJsonString , [ cArrayPath ], [cCursorStructure & object mappings ] )

    Similar to SqlServer 2016 openJson function

Tests & Sample files

  • nfOpenJsonTest: samples taken from https://docs.microsoft.com/en-us/sql/t-sql/functions/openjson-transact-sql

  • 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

Release Notes

2022/07/09 ( PatrickvonDeetzen )

  • create json with special characters is now significantly faster (changes made in function "escapeandencode")
  • updated performance test & added new test sample
  • bug fix: missing m. in nfcursortoobject.prg

2019/06/14

  • JsonFormat function by Carlos Alloati

2017/08/05

  • no matter wich strictdate setting you have set, a JsonDateTime "0000-00-00T00:00:00" will return an empty date.
  • valid JsonDates with time "T00:00:00" will return a date value ( ie: {"testDate":"2017-12-01T00:00:00"} )
  • invalid dates ( ie 2017/50/50 ) properly formatted as Json Date ( ie: 2017-50-50T00:00:00 ) will throw error; ( previous behavior was to return .null. )

2017/03/10

  • fixed: proper support for 19 character strings with ISO basic date format & different strictdate settings.

2017/02/05

  • fixed: nfJsonRead bug fix: incorrect parsing for strings terminated with escaped double quotes; minor changes & code refactoring.

2017/01/11

  • fixed: nfJsonRead: incorrect unescaped output with "set exact = on"
  • escapetest.prg - removed "leftover" lines.

2017/01/11

  • fixed issue escaping values terminated with "
  • nfJsonRead: removed parameter "isFile" now you can just pass a file name or string
  • added test: escapeTest.prg

2016/09/28

  • minor bug fix: zero item collections created as 1 empty item collection
  • proper indent for raw/formatted collection objects

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 distribution 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
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].