Skip to content
Back

[SOLVED] Json object

  • 0
  • Databases
  • Flutter
Nimit Savant
27 Feb, 2023, 22:00

then you can use this directly

TypeScript
Future result = databases.createDocument(
    databaseId: '[DATABASE_ID]',
    collectionId: '[COLLECTION_ID]',
    documentId: '[DOCUMENT_ID]',
    data: random,
  );
TL;DR
A user was seeking help with a Json object issue in a Flutter app. Multiple suggestions were given, including storing the dictionary on a server instead of locally, checking the word correctness on every move, using the Storage API instead of the Database API for static file data, seeking help from the Flutter community, and the possibility of running a database migration. The user was also provided with a link to a Stack Overflow post for reading a JSON file in Dart. The issue was ultimately resolved by providing code to create a document using the provided Json object.
Nimit Savant
27 Feb, 2023, 22:00

just get that gts obj in your code

Nimit Savant
27 Feb, 2023, 22:00

find ways to that in dart, or just copy paste it

hy
27 Feb, 2023, 22:01

93k lines

Nimit Savant
27 Feb, 2023, 22:01

Its asking for a json object not a file

Nimit Savant
27 Feb, 2023, 22:02

you're working a flutter app if I'm not mistaken right?

hy
27 Feb, 2023, 22:03

yes, for it

Nimit Savant
27 Feb, 2023, 22:03

why would you keep a json file that big in your flutter app?

Nimit Savant
27 Feb, 2023, 22:03

also just 1 document that big?

Nimit Savant
27 Feb, 2023, 22:03

are you running a migration of your database?

hy
27 Feb, 2023, 22:04

this is a dictionary data and I want to check from it the correctness of the words entered by the player

Nimit Savant
27 Feb, 2023, 22:06
Nimit Savant
27 Feb, 2023, 22:06

Also this is not an appwrite issue

Nimit Savant
27 Feb, 2023, 22:06

its a flutter thing, you could ask in flutter community they would give you better help

Nimit Savant
27 Feb, 2023, 22:06

this mostly solves your issue

Drake
27 Feb, 2023, 22:07

If this is static file data, it might be best to store it using the Storage API instead of Database API

hy
27 Feb, 2023, 22:07

I also have such forms of the data

Nimit Savant
27 Feb, 2023, 22:08

read that file and then enter that variable in your dart.

Nimit Savant
27 Feb, 2023, 22:08

+1

hy
27 Feb, 2023, 22:09

Is this a good way for me to check if there is such a word here every time the player makes a move?

Nimit Savant
27 Feb, 2023, 22:11

better to keep this in app and check it on every type occurrence, you don't have to keep this in appwrite database (in my personal opinion)

hy
27 Feb, 2023, 22:12

i thought it would be safer to keep the dictionary on the server

Nimit Savant
27 Feb, 2023, 22:14

you'll get more of these ideas on a flutter forum

hy
27 Feb, 2023, 22:15

Thank you and Mr. Steven for your help.

Drake
28 Feb, 2023, 17:16

[SOLVED] Json object

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more