line2 does not end in \n because it is the last data and there are no more lines after it. even so if you make a mistake and put a \n at the end, the code corrects that error.
The solution to not have to use JSON, I do it in the html file just look and study it.
you might want to test the project using the apk file on another device(!) to find out, that it does not work anymore…
the following tip might help…
Yes, you also can upload html files as assets into App Inventor! There is only one special thing to consider: During development, you have to use the development path to the embedded html document:
file:///mnt/sdcard/AppInventor/assets/<NAME OF YOUR HTML FILE>.html
Before packaging the app, use the production path.
file:///android_asset/<NAME OF YOUR HTML FILE>.html
alternatively use the PathToAssets method from the tools extension…