All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.xiaoleilu.hutool.json.JSON Maven / Gradle / Ivy

package com.xiaoleilu.hutool.json;

import java.io.Writer;

/**
 * JSON接口
 * @author Looly
 *
 */
public interface JSON{
	
	/**
	 * 将JSON内容写入Writer,无缩进
* Warning: This method assumes that the data structure is acyclical. * * @param writer Writer * @return Writer * @throws JSONException */ public Writer write(Writer writer) throws JSONException; /** * 将JSON内容写入Writer
* Warning: This method assumes that the data structure is acyclical. * * @param writer writer * @param indentFactor 每一级别的缩进量 * @param indent 顶级别缩进量 * @return Writer * @throws JSONException */ public Writer write(Writer writer, int indentFactor, int indent) throws JSONException; /** * 转换为JSON字符串 * @param indentFactor 每一级别的缩进 * @return JSON字符串 * @throws JSONException */ public String toJSONString(int indentFactor) throws JSONException; }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy