JsonAnnotation

文章目录

JsonAnnotation效果

效果


JsonAnnotation

JsonAnnotation

JsonAnnotation

JsonAnnotation

JsonAnnotation

JsonAnnotation

JsonAnnotation说明

JsonAnnotation是一个 androidStudio 的Json 注解插件 , 更加方便快捷。我们的福音来啦。

温馨提示

  • JsonAnnotation 的更多使用请直接看下方的代码例子片段,或查看官方文档。

JsonAnnotation 使用

例子1


    dependencies {
        //...
        classpath 'com.neenbedankt.gradle.plugins:android-apt:1.7'
    }

 

例子2


apply plugin: 'android-apt'

 

例子3


@Json2Model(modelName = "UserInfo",jsonStr = "{\n"
            + "    \"id\": 100,\n"
            + "    \"body\": \"It is my post\",\n"
            + "    \"number\": 0.13,\n"
            + "    \"created_at\": \"2014-05-22 19:12:38\"\n"
            + "}")
    String SEARCH_URSER_INFO = "search/user"; // api url
 

例子4


Copyright 2015 Jack Tony

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

 

本文来至GitHub,看到好的 Android 支持您也可以和站长一起发布哦!

JsonAnnotation下载

ApkDemo原文链接:,转发请注明来源于ApkDemo.com!

发表评论

要发表评论,您必须先登录