---
title: "4中json解析工具"
author: "dannyhz"
date: "2019-01-17T17:51:58Z"
tags: []
categories: ["企业架构"]
slug: "4-json"
draft: false
lastmod: "2019-01-17T17:52:32Z"
id: 2436738
url: "https://dannyhz.iteye.com/blog/2436738"
---

> 
> Gson  fastJson
> https://www.cnblogs.com/kunpengit/p/4001680.html
> 
> 
> Gson将对象转成Json对象的方法
> 
> Gson gson=new Gson();  
> String json=gson.toJson(Student.class);  
> 1
> 2
> 这种情况，如果Student属性中的某个值包含有=，会变为\u003d的情况
> 
> 只需将Gson的初始化修改为
> 
> Gson gson = new GsonBuilder().disableHtmlEscaping().create();
> 
> 
>