I want to convert a Foxpro 2.6 Dos Data file (DBF – DBase III Format) into JSON file. Do we have any C/C++ Library to convert DBF to JSON as well as back from JSON to DBF.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Perl module
DBD::XBasewill help you.On Linux:
sudo apt-get install libdbd-xbase-perlOn Windows: install ActivePerl, then
ppm install DBD::XBaseAfter that, you will have command line utility
dbf_dump(dbfdumpon Windows) that can convert DBF file into CSV (you will need to use--fs ","switch to create CSV), and then you can convert CSV into JSON.However, I would recommend learning how Perl DBI works, and writing code that can read from your DBF like from any other SQL/DBI source. Your Perl code may look like this: