B4J Question [BANano]: How to embed & read json file? / rather use BANanoSQL to load it?

Discussion in 'B4J Questions' started by Mashiane, Jan 25, 2019.

  1. Mashiane

    Mashiane Expert Licensed User

    Hi there

    I'm not sure if this is possible or not even with other web stuff however I have something in mind.

    I have json file that I need my app to read. Actually Im thinking of converting an sqlite db to json that my app will use in read only mode. I guess I can use sql.js without the need to convert the file, but anyway, let's assume I have a json file. Besides BANano has an sql engine so that will rather be not so on.

    This off course will sit on the assets folder of the app. What could be the best approach for this?

    perhaps use <script type=application/json> of <... type=text/javascript> to refer to the file and it will be loaded?

    The backend for BANano alaSQL has a method,

    ATTACH FILESTORAGE DATABASE one("./myFile.json");
    That seems to be able to do something like this. It would be perfect actually, however I dont know how I can ever get this to work.

    Thanks in advance.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice