国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁(yè) > 系統(tǒng) > Android > 正文

詳解Android平臺(tái)JSON預(yù)覽(JSON-handle)

2019-12-12 00:32:05
字體:
來(lái)源:轉(zhuǎn)載
供稿:網(wǎng)友

開(kāi)發(fā)中需要用到j(luò)son,在瀏覽器顯示的json非常亂,難以理解。有沒(méi)有讓人一目了然的工具,讓json看起來(lái)非常直觀呢,json-handle隨之而出,包含火狐和chrome兩種插件,官方地址:http://jsonhandle.sinaapp.com/

Chrome常用的插件 JSON-handle ,用過(guò)的都知道。

對(duì)于經(jīng)常在瀏覽器調(diào)試json的你,json-handle是個(gè)不二的選擇.最近在做接口加密,所有的數(shù)據(jù)( requestresponse )都是加密數(shù)據(jù),無(wú)法溝通 fildder 或者 Charles 抓包查看。那么自己做一個(gè)查看 json` 格式的View`:支持動(dòng)態(tài)的放大,縮小,支持所有數(shù)據(jù)格式~!

效果圖:

GitHub地址: JsonHandleView

依賴

implementation 'com.tzx.json:jsonhandleview:1.0.0'

使用

<?xml version="1.0" encoding="utf-8"?><FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"  android:layout_width="match_parent"  android:layout_height="match_parent"  android:fillViewport="true"  android:orientation="vertical">  <com.dandan.jsonhandleview.library.JsonViewLayout    android:id="@+id/jsonView"    android:layout_width="match_parent"    android:layout_height="wrap_content" /></FrameLayout>
JsonViewLayout jsonViewLayout = findViewById(R.id.jsonView);jsonViewLayout.bindJson("your json strings." || JSONObject || JSONArray);

自定義風(fēng)格

// ColorjsonViewLayout.setKeyColor()jsonViewLayout.setObjectKeyColor()jsonViewLayout.setValueTextColor()jsonViewLayout.setValueNumberColor()jsonViewLayout.setValueNullColor()jsonViewLayout.setValueBooleanColor()jsonViewLayout.setArrayLengthColor()// TextSizejsonViewLayout.setTextSize()

文章到這里就全部講述完啦,若有其他需要交流的可以留言哦~!~!希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持武林網(wǎng)。

發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 比如县| 西盟| 杂多县| 富顺县| 泰宁县| 平陆县| 繁峙县| 永吉县| 田林县| 宁都县| 祁连县| 荣成市| 讷河市| 哈尔滨市| 连平县| 惠东县| 页游| 黄陵县| 安阳县| 临泉县| 汉阴县| 遂溪县| 莎车县| 荣成市| 靖西县| 武隆县| 荃湾区| 五原县| 淮滨县| 荣成市| 开封市| 满城县| 湟源县| 海丰县| 阿城市| 汉阴县| 称多县| 阿克陶县| 秭归县| 长葛市| 宁津县|