@SuppressWarnings("unchecked")
    public <T> T collectOne(InputStream inputStream, Class<T> tClass, JsonPath... paths) {
        CollectOneListener listener = new CollectOneListener(true);
        SurfingConfiguration.Builder builder = configBuilder().skipOverlappedPath();
        for (JsonPath jsonPath : paths) {
            builder.bind(jsonPath, listener);
        }
        surf(inputStream, builder.build());
        Object value = listener.getValue();
        return tClass.cast(jsonProvider.cast(value, tClass));
    }
@ SuppressWarnings ( "unchecked" ) public < T > T collectOne ( InputStream inputStream , Class < T > tClass , JsonPath ... paths ) { CollectOneListener listener = new CollectOneListener ( true ) ; SurfingConfiguration . Builder builder = configBuilder ( ) . skipOverlappedPath ( ) ; for ( JsonPath jsonPath : paths ) { builder . bind ( jsonPath , listener ) ; } surf ( inputStream , builder . build ( ) ) ; Object value = listener . getValue ( ) ; return tClass . cast ( jsonProvider . cast ( value , tClass ) ) ; }
Collect the first matched value and stop parsing immediately

@param inputStream Json inpustream
@param tClass      type
@param paths       JsonPath
@param <T>         type
@return typed value