Skip to content
This repository has been archived by the owner on Apr 28, 2023. It is now read-only.

[Question] Data structure not correct? #13

Open
scheung38 opened this issue Aug 4, 2020 · 1 comment
Open

[Question] Data structure not correct? #13

scheung38 opened this issue Aug 4, 2020 · 1 comment

Comments

@scheung38
Copy link

scheung38 commented Aug 4, 2020

data = ['id,Name,Type1,Type2,HP,Attack,Defense,SpecialAtk,SpecialDef,Speed,Generation,Legendary,Mega\n', '1,Bulbasaur,Grass,Poison,45,49,49,65,65,45,1,FALSE,FALSE\n', '2,Ivysaur,Grass,Poison,60,62,63,80,80,60,1,FALSE,FALSE\n', '3,Mega Venusaur,Grass,Poison,80,100,123,122,120,80,1,FALSE,TRUE\n',

with open('Final-Problem-1/abc.json', 'w') as outfile:
    json.dump(data, outfile, indent=4)

abc.json

{ "pokedex" :
    [
    "id,Name,Type1,Type2,HP,Attack,Defense,SpecialAtk,SpecialDef,Speed,Generation,Legendary,Mega\n",
    "1,Bulbasaur,Grass,Poison,45,49,49,65,65,45,1,FALSE,FALSE\n",
    "2,Ivysaur,Grass,Poison,60,62,63,80,80,60,1,FALSE,FALSE\n",
    ]
}

json2graphql

Verifying URL... Done!
Processing JSON data... Error
message: a unique column with name "id" must present in table "pokedex"

@qbunt
Copy link

qbunt commented Aug 25, 2021

@scheung38 this looks like invalid JSON to me?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants