Retrofit RxJava okhttp
compile 'com.squareup.retrofit2:retrofit:2.1.0' compile 'com.squareup.retrofit2:converter-gson:2.1.0' compile 'com.squareup.retrofit2:adapter-rxjava:2.1.0' compile 'io.reactivex:rxandroid:1.2.0'
compile 'com.squareup.retrofit2:retrofit:2.1.0' compile 'com.squareup.retrofit2:converter-gson:2.1.0' compile 'com.squareup.retrofit2:adapter-rxjava:2.1.0' compile 'io.reactivex:rxandroid:1.2.0'
compile 'com.squareup.retrofit2:retrofit:2.1.0' compile 'com.squareup.retrofit2:converter-gson:2.1.0' compile 'com.squareup.retrofit2:adapter-rxjava:2.1.0' compile 'io.reactivex:rxandroid:1.2.0'
fastjson简介: Fastjson是一个Java语言编写的高性能功能完善的JSON库。fastjson采用独创的算法,将parse的速度提升到极致,超过所有json库,包括曾经号称最快的jackson。并且还超越了google的二进制协议protocol buf。Fastjson完全支持http://json.org的标准,也是官方网站收录的参考实现之一。支持各种JDK类型。包括基本类型、JavaBean、Collection、Map、Enum、泛型等。支持JDK 5、JDK 6、Android、阿里云手机等环境。 一. fastjson生成json字符串(JavaBean,List<JavaBean>,List<String>,List<Map<String,Object>) String jsonStrng = JSON.toJSONString(object); 二. fastjson 解析json字符串为四种类型 1. JavaBean Person person = JSON.parseObject(jsonString, Person.class); 2. List<JavaBean> List<Person> listPerson =JSON.parseArray(jsonString, Person.class); 3. List<String> List<String> listString = JSON.parseArray(jsonString, String.class); 4. List<Map<String,Object>> List<Map<String, Object>> listMap = JSON.parseObject(jsonString, new TypeReference<List<Map<String,Object>>>(){});
在Android中用Parcelable序列化虽然效率高,但是比Serializable麻烦很多;现在只要添加一个Jar包就可以省去序列化的过程,很方便。 Jar包在项目里,可以直接使用,也可以查看里面的文本文件"README.md"
android shortcut 快捷键方式(已测可用) 在一些定制机和对系统SDK做过深度开发的手机上不一定能正确使用,如魅族MX,索尼,红米,Hike