Author | Topic: json | |
---|---|---|
Osvaldo Ramirez | json on Thu, 25 Mar 2021 10:45:14 -0600 hello Guys Talking about json object created by dataobject() Is there a DBEJSON ? The Idea behind of this, have a httpserver that response a json data to the client, then on the client side, use the json data as local dbf file with their functions like skip, replace, add, delete, browse, etc,etc. Is it possible ? Thanks in advance Best Regards Osvaldo Ramirez | |
Boris Borzic | Re: json on Thu, 25 Mar 2021 18:26:16 +0100 Osvaldo Ramirez wrote in news:38862072$66b24d13$bb96@news.alaska- software.com: > Talking about json object created by dataobject() > > Is there a DBEJSON ? > > The Idea behind of this, have a httpserver that response a json data to > the client, then on the client side, use the json data as local dbf file > with their functions like skip, replace, add, delete, browse, etc,etc. You can do this but will likely be lots of work. If both ends (client + server) are Xbase++, a simple alternative would be to use SQLDataSet (from SQLExpress lib). Create an SQLDataSet object on server and send to client. Client can browse/skip/delete/add, etc... A simple way to send the SQLDataSet object to client is using a SOAP function (send as attachment). Best regards, Boris Borzic http://xb2.net http://sqlexpress.net industrial strength Xbase++ development tools | |
Osvaldo Ramirez | Re: json on Thu, 25 Mar 2021 15:29:22 -0600 On 25/03/21 11:26, Boris Borzic wrote: > Osvaldo Ramirez wrote in news:38862072$66b24d13$bb96@news.alaska- > software.com: > >> Talking about json object created by dataobject() >> >> Is there a DBEJSON ? >> >> The Idea behind of this, have a httpserver that response a json data to >> the client, then on the client side, use the json data as local dbf file >> with their functions like skip, replace, add, delete, browse, etc,etc. > > You can do this but will likely be lots of work. > > If both ends (client + server) are Xbase++, a simple alternative would be > to use SQLDataSet (from SQLExpress lib). > > Create an SQLDataSet object on server and send to client. Client can > browse/skip/delete/add, etc... A simple way to send the SQLDataSet object > to client is using a SOAP function (send as attachment). > Thanks Boris If it were all xbase++, it would be excellent, but in these times the servers are different, node.js, php and phyton and most of the new developments no longer give us xml, only json. For example, one of my client use node.js and php with mongodb + mariaDb, all like a restfullwebservice and they only send json datas. But as you said, it will be a lot of work as a DBEJSON. Best Regards Osvaldo Ramirez | |
Osvaldo Ramirez | Re: json on Thu, 25 Mar 2021 15:55:09 -0600 On 25/03/21 11:26, Boris Borzic wrote: > Osvaldo Ramirez wrote in news:38862072$66b24d13$bb96@news.alaska- > software.com: > >> Talking about json object created by dataobject() >> >> Is there a DBEJSON ? >> >> The Idea behind of this, have a httpserver that response a json data to >> the client, then on the client side, use the json data as local dbf file >> with their functions like skip, replace, add, delete, browse, etc,etc. > > You can do this but will likely be lots of work. > > If both ends (client + server) are Xbase++, a simple alternative would be > to use SQLDataSet (from SQLExpress lib). > > Create an SQLDataSet object on server and send to client. Client can > browse/skip/delete/add, etc... A simple way to send the SQLDataSet object > to client is using a SOAP function (send as attachment). > Boris, Maybe, the best way could be : => Send a Post to the server <= recive a json data == transform json data to SQLDataSet Cursor/DBF Play with that Regards Osvaldo Ramirez | |
Boris Borzic | Re: json on Fri, 26 Mar 2021 00:05:33 +0100 Osvaldo Ramirez wrote in news:6c5f0913$3b20f3bb$b7df@news.alaska- software.com: > Maybe, the best way could be : > >=> Send a Post to the server ><= recive a json data >== transform json data to SQLDataSet Cursor/DBF > Play with that Yes that will work assuming the (client) using the SQLDataSet is Xbase++. Best regards, Boris Borzic http://xb2.net http://sqlexpress.net industrial strength Xbase++ development tools | |
Andreas Gehrs-Pahl | Re: json on Sat, 27 Mar 2021 22:25:59 -0400 Osvaldo, >Talking about json object created by dataobject() DataObject() doesn't create a JSON object. The function JSON2Var() can convert a JSON text into a value, though. That value is usually either a single DataObject or an Array of DataOjects. You can easily iterate through Arrays and access DataObjects using pure Xbase++, in a way that is very similar to (database) records. You can also, to a degree, use Xbase++'s Universal SQL to access, create, and manipulate Arrays of DataObjects. And finally, you can use the Var2JSON() function to convert a DataObject or and Array of DataObjects -- or most any value -- into a JSON text. Hope that helps, Andreas Andreas Gehrs-Pahl Absolute Software, LLC phone: (989) 723-9927 email: Andreas@AbsoluteSoftwareLLC.com web: http://www.AbsoluteSoftwareLLC.com [L]: https://www.LinkedIn.com/in/AndreasGehrsPahl [F]: https://www.FaceBook.com/AbsoluteSoftwareLLC |