private void skipField(JsonParser parser) throws IOException
    {
        int nestedObjects = 1; // we already parsed first '{' or '['
        while (nestedObjects > 0 && parser.nextToken() != null)
        {
            JsonToken token = parser.getCurrentToken();
            if (token == START_OBJECT || token == START_ARRAY)
            {
                nestedObjects++;
            }
            else if (token == END_OBJECT || token == END_ARRAY)
            {
                nestedObjects--;
            }
        }
    }
Skip through the entire object/array field and all nested objects/arrays inside it
protostuff-json/src/main/java/io/protostuff/JsonInput.java