android fastjson的简单使用

时间:2024-03-22 14:30:00

1.项目添加fastjson

选中项目---->右键--->open module setting 

    android fastjson的简单使用

选择app依赖--->dependencies---->左下角+号 --->Library dependency  

android fastjson的简单使用

输入关键词 fastjson ----->选择自己需要的fastjson ,我选择com.aliba:fastjson

android fastjson的简单使用

2.GsonFormat的使用

新建class文件 
android fastjson的简单使用
例如:Userbean --->右键(光标放入方在大括号内)--->Generate...
android fastjson的简单使用
--->GsonFormat 
android fastjson的简单使用
---->输入你要解析的数据的事例
android fastjson的简单使用
---->OK  ---> OK(自动生成Userbean)
android fastjson的简单使用