Skip to content

Gson 解析容错框架,愿从此再无 Json 解析报错

License

Notifications You must be signed in to change notification settings

xin78693304/GsonFactory

 
 

Repository files navigation

Json 解析容错框架

Gradle 集成

dependencies {
    // Gson 解析容错:https://github.com/getActivity/GsonFactory
    implementation 'com.hjq.gson:factory:2.2'
    // Json 解析框架:https://github.com/google/gson
    implementation 'com.google.code.gson:gson:2.8.0'
}

使用文档

// 获取单例的 Gson 对象(已处理容错)
Gson gson = GsonFactory.getSingletonGson();

// 创建一个 Gson 构建器(已处理容错)
GsonBuilder gsonBuilder = GsonFactory.createGsonBuilder();

作者的其他开源项目

Android技术讨论Q群:78797078

如果您觉得我的开源库帮你节省了大量的开发时间,请扫描下方的二维码随意打赏,要是能打赏个 10.24 🐵就太👍了。您的支持将鼓励我继续创作:octocat:

License

Copyright 2020 Huang JinQun

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.

About

Gson 解析容错框架,愿从此再无 Json 解析报错

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%