Open Import API from file

Discussion in 'AutoWeb' started by szmerek, Jul 6, 2017.

  1. szmerek

    szmerek Member

    Joined:
    Jul 4, 2016
    Messages:
    88
    Likes Received:
    14
    I've created backup of my APIs. I would like to restore them from that file. Can't restore them now. Toasting that json is invalid. Here is a log:
    Errors - 2017-07-06 11:47:27.208 - Json error: com.google.gson.s: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    4,341
    Likes Received:
    403
    Can you check the contents of the file? What's there?
     
  3. szmerek

    szmerek Member

    Joined:
    Jul 4, 2016
    Messages:
    88
    Likes Received:
    14
    The file can be read by any Sqllite viewer on the phone as well as on the PC. I can see the database tables with APIs.
    I've reinstalled AutoWeb and tried to restore:
    - just imported and backuped random Api from Web Services
    - the last backup file (backup taken on week ago)
    - and some old backup file (from March this year)
    All above attempts to restore (different files) failed. With the same flash - invalid json. With the same log reading.
     
    Last edited: Jul 7, 2017
  4. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    4,341
    Likes Received:
    403
    Hmm, do you mean you're trying to import the database file with all the APIs? That function is meant to import a single API from a JSON file that represents the API. Not an SQL database file. Hope this clarifies it.
     
  5. szmerek

    szmerek Member

    Joined:
    Jul 4, 2016
    Messages:
    88
    Likes Received:
    14
    All clear. Thanks.
     

Share This Page