-1
In the Android app, using Java, I get a Json string that looks like this:
String teste = "{\n" + " \"nometabela\":{\n" + " \"id\":\"f83d6101cc\",\n" + " \"coluna1\":\"codigo\",\n" + " \"coluna2\":\"descricao\",\"coluna3\":\"quantidade\"\n" + " }
With this data, I need to create the database using Sqlite. For example, the given "table name" within the Json string will have to be the table name, the "id" will be "f83d6101cc", the name of the first column will be "code", the second "description" and the third "quantity".
With the fixed data, I was able to create the database.
However, the data won’t always look like this. I’ll never know what this Json file looks like. The database created will have to be based on it, so there may be more columns, or fewer columns, etc.
How do I read this String Json and create a database according to the values passed by it? Thank you.