Getting simple JSON object response using Retrofit library

后端 未结 8 2038
感动是毒
感动是毒 2020-12-17 17:59

I have a web query with JSON response as:

{
    \"status\":true,
    \"result\":
      {
        \"id\":\"1\",
        \"name\":\"ABC 1\",
        \"email\":         


        
8条回答
  •  自闭症患者
    2020-12-17 18:22

    I`m using this site to create my classes (POJO) from JSON.

    http://www.jsonschema2pojo.org/ just be sure to set to JSON insted of JSON Schema and check GSON, because retrofit is using GSON as well for parsing.

    your retrofit code looks fine.

提交回复
热议问题