Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert Foxpro Memory Variable to a DBF

Status
Not open for further replies.

Allwolfpackfan

Programmer
May 9, 2019
21
0
1
US
Hi, I am trying to pull JSON data from the cloud. My goal is to get the data to a dbf for analysis. So far I can pull the data into a Foxpro memory variable. It's a huge memory variable with each record enclosed in {} with field header and field detail separated by a colon and each record field header and detail separated by a comma. Any idea on how to get this to a dbf? I'm shocked how these "newer tools" are very difficult to use. Looks like computer languages are going backwards instead of forward.
 
In response to your opinion: JSON is part of JS, and it's not that astonishing it has an important place in the web, web services, besides XML. And how database servers and other, even non Web related programming languages have been extended to work with JSON as a data format.

What you describe technical sounds like this JSON data, mainly.

Well, there is
there is
there are JSON features like serialization/deserialization in WebConnection, which covers much more than just JSON, though, and is over the top just for json, but a logical candidate to use for the JSON aspect, if you use it already anyway.

Chriss
 
JSON may be important for the web but so far it's horrible to use. Once again, I can't even do something basic like pull the data into a dbf or csv file. Thanks for the comment but it does not help me solve the problem. If JSON was so good, they would have a way to convert it to a csv file. I'm used to SQL and Oracle servers that have worked great for 30 years with no problems. The new stuff is the problem. Just Microsoft trying to sell more stuff that's no better.
 
I can't even do something basic like pull the data into a dbf or csv file
Well, there's a very basic explanation for this, as JSON in general isn't a dbf or csv file or abstract a list of data tuples.
If it is, i.e. if a list of data tuples is turned into a JSON string, it's also possible to get back to a tuple list, most likely an array of (record) objects. If not, it's not a table.

Chriss
 
All I know is I don't see any way to convert JSON to a dbf or csv so it's worthless at this point. I'm telling my company to stay away from it. Stick with SQL or Oracle if it's related to data. Once again, if JSON was so great, they would have an easy way to convert it.
 
JSON is a transport medium for an object, not a table, you're just thinking wrong about it.

Chriss
 
I don't know of anyone writing libraries for other versions of VFP than VFP9. I can't help you out here, I don't think there's an easy way to rewrite nfJson, for example, to work with VFP6, too. But you can always open something like that as an issue in the github page and see whether the developer of the library cares enough for older VFP versions, too.

Chriss
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top