public class JsonUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
JsonUtils.InstantAdapter |
static class |
JsonUtils.LocalDateTimeAdapter |
| Constructor and Description |
|---|
JsonUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
asJson(Object o) |
static <T> String |
asJson(Object o,
Function1<com.google.gson.GsonBuilder,com.google.gson.GsonBuilder> gsonBuilder) |
static <T> String |
asJsonWithBuilder(Object o,
Function1<T,T> gsonBuilder,
Class<T> gsonBuilderClass) |
static String |
prettyPrint(String json) |
static String |
reorderFields(String json) |
static com.google.gson.JsonObject |
sortJsonObject(String json) |
static com.google.gson.JsonObject |
sortJsonObjectFields(com.google.gson.JsonObject jsonObject) |
public static <T> String asJsonWithBuilder(Object o, Function1<T,T> gsonBuilder, Class<T> gsonBuilderClass)
public static <T> String asJson(Object o, Function1<com.google.gson.GsonBuilder,com.google.gson.GsonBuilder> gsonBuilder)
public static com.google.gson.JsonObject sortJsonObject(String json)
public static com.google.gson.JsonObject sortJsonObjectFields(com.google.gson.JsonObject jsonObject)
Copyright © 2023. All rights reserved.