private void compact ( Document doc , QueryAdapter queryAdapter ) { if ( queryAdapter != null && queryAdapter . getCompactMode ( ) ) { if ( doc . getIncluded ( ) != null ) { compact ( doc . getIncluded ( ) ) ; } if ( doc . getData ( ) . isPresent ( ) ) { if ( doc . isMultiple ( ) ) { compact ( doc . getCollectionData ( ) . get ( ) ) ; } else { compact ( doc . getSingleData ( ) . get ( ) ) ; } } } }
removes unncessary json elements