Back

[Closed] An error occurred while seeding data.The JSON value could not be

  • 0
  • Self Hosted
  • Tools
  • Databases
Suiii
13 Dec, 2023, 09:57

when submiting data from .NET int variable to interger in appwrite

TL;DR
The user encountered an error while seeding data. The issue was that a JSON value could not be converted. The error was specifically caused by a "NumberOfVillage" value that was supposed to be an integer but was passed as a string ("1,010"). The error occurred while making an API call. To solve this issue, the user needs to ensure the "NumberOfVillage" value is passed as an integer before making the API call.
Suiii
13 Dec, 2023, 09:58

[Error] An error occurred while seeding data.The JSON value could not be converted to System.Int32. Path: $[4].NumberOfVillage | LineNumber: 67 | BytePositionInLine: 34.

Suiii
19 Dec, 2023, 17:20

it can't parse int?

Drake
19 Dec, 2023, 17:23

what are you passing?

Suiii
19 Dec, 2023, 17:25
TypeScript
        "Code": "1",
        "NameEN": "Meanchey",
        "Type": "Province",
        "NumberOfDistrict": 2,
        "NumberOfVillage": 7,
    },```
Suiii
19 Dec, 2023, 17:25

this is sample json,

Drake
19 Dec, 2023, 17:26

is this what it's actually failing on? And is it failing before or after the API call?

Suiii
19 Dec, 2023, 17:27

should be before

Suiii
19 Dec, 2023, 17:31

I found issue, there is "NumberOfVillage": "1,010",

Suiii
19 Dec, 2023, 17:31

[Closed] An error occurred while seeding data.The JSON value could not be

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