如何将JSON文件转换为LinkedHashMap?

时间:2020-02-06 15:32:48

标签: java json dictionary linkedhashmap

我正在制作字典,并且正在尝试将老师给出的100个单词的JSON文件转换为LinkedHashMap。例如:

  {
    "word": "scatter",
    "definitions": [
      {
        "definition": "strew or distribute over an area",
        "partOfSpeech": "verb"
      },
      {
        "definition": "the act of scattering",
        "partOfSpeech": "noun"
      },
      {
        "definition": "move away from each other",
        "partOfSpeech": "verb"
      },
      {
        "definition": "cause to separate",
        "partOfSpeech": "verb"
      },
      {
        "definition": "sow by scattering",
        "partOfSpeech": "verb"
      }
    ],
    "synonyms": [
      "spread",
      "sprinkle"
    ],
    "antonyms": []
  },

有什么方法可以帮助从此json构建LinkedHashMap吗?谢谢!

0 个答案:

没有答案