Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
NfJson Update
Message
From
31/05/2017 22:23:05
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
VFPX/Sedna
Title:
NfJson Update
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01651697
Message ID:
01651697
Views:
79
Likes (1)
Just posted a major Update of nfJson on the new VFPX github site ( https://github.com/VFPX/nfJson )

If you use nfJson please download the latest version.

I'm also glad to announce that I've included a BETA PREVIEW of nfOpenJson, a function similar to the new "openJson" function in Sqlserver 2016, wich allows you to convert Json to cursor. Please check nfOpenJsonTest and https://docs.microsoft.com/en-us/sql/t-sql/functions/openjson-transact-sql for clear explanation.

Now you can do:
 text to mssample2 noshow
[
  {
    "Order": {
      "Number":"SO43659",
      "Date":"2011-05-31T00:00:00"
    },
    "AccountNumber":"AW29825",
    "Item": {
      "Price":2024.9940,
      "Quantity":1
    }
  },
  {
    "Order": {
      "Number":"SO43661",
      "Date":"2011-06-01T00:00:00"
    },
    "AccountNumber":"AW73565",
    "Item": {
      "Price":2024.9940,
      "Quantity":3
    }
  }
]
ENDTEXT


nfOpenJson( m.mssample2,'$.array',';
 - Number   v(200) $.Order.Number  ;
 - Date     t      $.Order.Date    ;
 - Customer v(200) $.AccountNumber  ;
 - itemPrice n(6,2) $.Item.Price ;
 - itemQuantity i   $.Item.Quantity ;
 - Order  JSON')

browse
and get:

- see attached image -

Marco Plaza
@nfoxdev
github.com/nfoxdev
Next
Reply
Map
View

Click here to load this message in the networking platform