FormatUtils

用于数据格式化的工具类,例如:格式化JSON、XML

Utility class for data formatting (e.g., JSON, XML).

Author

Jenly

Follow me

Functions

Link copied to clipboard
fun formatJson(json: String, indentSpaces: Int = DEFAULT_INDENT_SPACES): String

格式化JSON字符串

Link copied to clipboard
fun formatXml(xml: String, indentSpaces: Int = DEFAULT_INDENT_SPACES): String

格式化XML字符串