package cn.citycraft.GsonAgent.api.stream;

public enum JsonToken {

    BEGIN_ARRAY,
    END_ARRAY,
    BEGIN_OBJECT,
    END_OBJECT,
    NAME,
    STRING,
    NUMBER,
    BOOLEAN,
    NULL,
    END_DOCUMENT;

    public static JsonToken getByName(String name) {
        for (JsonToken next : JsonToken.values()) {
            if (next.name().equals(name)) {
                return next;
            }
        }
        return null;
    }
}
