mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-08-06 04:24:08 +00:00
perf[storage]: 优化storage,调整了结构并减少了重复的代码块
This commit is contained in:
@@ -10,7 +10,6 @@
|
||||
* See the License for the specific language governing permissions and limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package com.zfoo.protocol.util;
|
||||
|
||||
import com.zfoo.protocol.model.Triple;
|
||||
@@ -21,11 +20,9 @@ import org.junit.Test;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @author jaysunxiao
|
||||
* @author godotg
|
||||
* @version 3.0
|
||||
*/
|
||||
|
||||
|
||||
public class JsonUtilTest {
|
||||
|
||||
public static String id = "\"id\":\"1000\"";
|
||||
@@ -114,5 +111,11 @@ public class JsonUtilTest {
|
||||
var tripleStr = JsonUtils.object2String(triple);
|
||||
var temp = JsonUtils.string2Object(tripleStr, Triple.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void prettyPrinterTest() {
|
||||
var user = JsonUtils.string2Object(userJson, User.class);
|
||||
System.out.println(JsonUtils.object2StringPrettyPrinter(user));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user