nightblade9/simple-english-dictionary

[Explain] - What is the format of this json data

Closed this issue ยท 4 comments

Hey first of all thank you for providing us with this easy json format of a dictionary.
I'm creating a node api of this dictionary but I'm not able to understand the format of JSON.
How could I respond with a word and meaning from this json.
Can u please explain me the schema of the JSON.
Thanks in advance

Hi,

The structure matches the structure of the originals. Here are two examples:

"ABLS": {"MEANINGS": [], "ANTONYMS": [], "SYNONYMS": ["Bachelor of arts in library science", "Abls"]}

If you load the dictionary into, say, var dictionary, then dictionary["ABLS"] would return the fragment above. As you can see, it has no meanings.

As for example two:

"ABLUTION": {"MEANINGS": [["Noun", "the ritual washing of a priest's hands or of sacred vessels", ["Ritual", "Wash", "Washing", "Lavation"], []]], "ANTONYMS": [], "SYNONYMS": ["Ablution"]},

dictionary['ABLUTION']["Meanings"][0] would return this array, let's call it word_data:

["Noun", "the ritual washing of a priest's hands or of sacred vessels", ["Ritual", "Wash", "Washing", "Lavation"], []]

word_data[0] is "Noun", word_data[1] is the first definition. I think word_data[2] is synonyms or related words or something.

Hope that helps.

Hey Thank You for your explanation.
It Helped me ๐Ÿ˜ƒ

Glad it helped. Just wanted to point out (again) that (surprisingly) not every word has definitions.

If you finish whatever you're building, please drop a note here and let me know! Would be cool to see this in use somewhere.

Glad it helped. Just wanted to point out (again) that (surprisingly) not every word has definitions.

If you finish whatever you're building, please drop a note here and let me know! Would be cool to see this in use somewhere.

Hi, I wanted to let you know that I've finished working on the dictionary API I was making with the help of your data. I apologise as I started working on it much later than I should have because I learnt few concepts of data structures in js and also i kept revising the front end portion and the response structure. I'm really excited to show you the results, you can find it on my simple-english-dictionary-api repo and also You can find the hosted version here . I hope you like it. I've wrote a node js script to change the schema of json, you can find that script on the first branch of the repo.
Please let me know if you have any questions or feedback ๐Ÿค“

Thanks again for your help!