Using SQL Server for generating JSON wasn’t totally successful so I created a program to reformat my record list into JSON for use in my JavaScript projects. I wanted to load it into my local storage and use it as a data source. See my previous article.
The program I created runs in the console and has no arguments. It just grabs a dump of my Artist and Record tables and merges the two sources as a 1 artist to many records JSON file.
I have a Google Chrome extension named JSON viewer Awesome and was using this for testing. The problem with this extension is that it doesn’t load JSON if it has validation issues. The other issue is that it doesn’t show where the errors have occurred.
The following view is validated JSON.
I then changed over to using the online JSONFormatter.org website and was able to upload my JSON and get an error message for each place I had an issue.
While searching for ways to generate JSON from SQL Server I found a video on using Powershell to generate JSON using calls to SQL Server. This looked interesting so I tried it out and it worked. Unfortunately it still didn’t validate and just generated rubbish. I loaded the data into a text editor and found that when it hit the line return point it chopped data and added three dots to the end of each line.
I am currently creating a JavaScript based website to display a version of my RecordDB database. The data will need to be consumed from a JSON file that will be stored in a web browser using local storage.
The advantage of using local storage is that it is persistent and will still be available once you close and reopen your web browser. The first part of this process will be to export my data from a SQL Server database to a JSON formatted file.
To be able to mount exFAT filesystem on Ubuntu you’ll need to install the free FUSE exFAT module and tools which provide a full-featured exFAT file system implementation for Unix-like systems.
Before installing the packages make sure the Universe repository is enabled on your system. Open your terminal either by using the Ctrl+Alt+T keyboard shortcut or by clicking on the terminal icon and type:
sudo add-apt-repository universe Once the repository is enabled update the packages index and install the exfat-fuse and exfat-utils packages using the following commands:
Creating a new installation of Linux on my notebook is a fairly complex process so these notes describe the whole process.
I need to download the latest version of Linux Mint from the Mint website as an ISO file.
Create a boot disk on a USB using Rufus. I am using an earlier version of Rufus (v 1.31.1320) because the later versions are thought to have adware built into them. Use the settings in the picture below.
Mint usually works with NTFS USB drives but if you can’t see the drive you can mount it yourself.
First run the command to see your hardware devices.
sudo fdisk -l At the Disk line
Disk /dev/sdb: 8004 Mb 8004304896 Bytes
This is the usb disk drive
At the Device Boot line you should see something like:
Device Boot Start End Blocks Id System /dev/sdb1 * 32 1234567 1234567 7 HPFS/NTFS/exFAT This will be another reference to the usb drive.
I use Google Earth to show all of the location points that I have created. The reason for this is that it doesn’t have the limitation of maximum number of points that Google maps has. I can drag a .kmz file onto the desktop in Google Earth and it will load the points and show them on the maps.
Initially when I did this it showed me nice icons and there were no placemark names appearing on the screen.
Note: all screenshots were taken from my Samsung tablet.
I have been saving my location points to Maps.me when we travel using my Samsung tablet. As I only download the points once a year it is very easy to forget the method I use to export my points.
Each year I create a new bookmark set, for example this year I created a set named Victoria-2019 and this is where I saved all of my local points.
Changing the Link program to download a Web Request My Link, Packt and Plural programs have been set up to manually get a webpage and this is a slow process.
I have updated the Link program to pass in a URL as an argument and then download and create the page automatically. This saves me a boring task.
The program update was more complex than I originally thought because the pages I was trying to download used a network security protocol so I was getting TLS security failure exceptions.