Just posted a major Update of nfJson on the new VFPX github site ( )
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 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:
Marco Plaza
Marco Plaza
@vfp2nofox
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 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:
Marco Plaza
Marco Plaza
@vfp2nofox