wjc
5 天以前 ef0dba8548e2813beee2af8c8c3db72c3cb56da0
1
2
3
4
5
6
7
8
9
10
11
12
13
package com.hdl.sdk.link.core.utils;
 
/**
 * Created by hxb on 2024/3/22.
 */
public class JsonUtils {
    public static boolean isJson(byte[] bytes) {
        if (bytes[0] == '{' && bytes[bytes.length - 1] == '}' || (bytes[0] == '[' && bytes[bytes.length - 1] == ']')) {
            return true;
        }
        return false;
    }
}