Skip to content

CapaSQLite.isJsonValidcitor SQLite.isJsonValid() issue #369

Answered by jepiqueau
storynana asked this question in Q&A
Discussion options

You must be logged in to vote

@storynana Thank for waiting
i did that

  • copy the testData-schema.db.txt in the assets/databases folder of one of my app and rename it as .json file
  • add in the tsconfig.json inside the compilerOptions
    "resolveJsonModule": true,
    "allowSyntheticDefaultImports": true,
  • edit my home page with
   ...
import { of } from 'rxjs';
import dbJson from 'src/assets/databases/testData-schema.db.json';
import { JsonSQLite, CapacitorSQLite } from '@capacitor-community/sqlite';
  ...

ngOnInit() {
  ...
    of(dbJson).subscribe(
      async (jsonExport: JsonSQLite) => {
      const jsonstring = JSON.stringify(jsonExport);
      console.log(jsonstring);
      const isValid = await CapacitorSQLit…

Replies: 9 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@storynana
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@whitnessme
Comment options

Answer selected by jepiqueau
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants