This wrapper makes it easy to get definitions from Jisho. Jisho is a powerful Japanese-English dictionary and lets you find words, kanji and example sentences quickly and easily Jisho Website
Stable builds can be found here: NuGet
To get a definition from the Jisho API here's what you should do:
JishoClient client = new JishoClient();
Using this client you can start retrieving definitions.
On the instance of JishoClient
you just created you can execute the GetDefinition
method. As the argument for this method you provide the "keyword" to use in the search. This can be any English or Japanese word. The GetDefinition
returns a JishoResult
which will contain all the data sent back by the API.
JishoResult result = client.GetDefinition("house");
A quick definition contains the top result from a query, the result will contain an English Sense
object and a Japanese
reading object.
JishoQuickDefinition qDefinition = client.GetQuickDefinition("house");
The root object of type JishoResult
contains a Meta
and Data
property alongside the Success
and Exception
property which will return the exception if anything goes wrong during the creation and execution of the API call. This is purely for development purposes and if you manage to throw an exception let me know.
The Meta
object contains one property called Status
. This property contains the Http Response Code (e.g. 200 or 404)
The Data
list of objects contains all the definitions that were returned using your search query. Every JishoData
object contains:
Property | |
---|---|
Slug | The slug is the set of Kanji or Kana characters of the word you requested |
IsCommon | Indicates if the requested word is common in the Japanese Language |
Tags | Ay tags that have been added to the definition |
Jlpt* | Indicates in which level of the Japanese Language Proficiency Test this word will start appearing |
Japanese | All the Japanese reading for the word, this property contains a list of objects where Word is most often the reading in kanji and Reading is the reading written in kana characters. |
Senses | All the English definitions of the word. This property contains an object with: All English Definitions, Parts of speech (e.g. "Noun"), Links, Tags, Restrictions, SeeAlso, Antonyms, Source, Info and Sentences |
Attribution | Contains attribution data |
* can be empty
If anything's not working feel free to create an issue and I'll take a look at it! I'll try to keep this wrapper working if the API updates.